Vous êtes sur la page 1sur 3

I wrote a method for J2ME SERIALIZATION !!! - msg#00153 - java.sun.kvm http://osdir.com/ml/java.sun.kvm/2004-08/msg00153.

html

osdir.com
mailing list archive
F.A.Q. -since 2001!

1 of 3 4/8/2011 2:43 PM
I wrote a method for J2ME SERIALIZATION !!! - msg#00153 - java.sun.kvm http://osdir.com/ml/java.sun.kvm/2004-08/msg00153.html

Subject: I wrote a method for J2ME SERIALIZATION !!! -


msg#00153
List: java.sun.kvm

Mail Archive Navigation:


by Date: Prev Next Date Index by Thread: Prev Next Thread Index

This is an example !!!

----------------------------------------------------------

/* Enterprise Architecture
* Created on 27-lug-04 Leading enterprise architecture solutions for
*/ financial services
www.ovationsgroup.com
Need Custom Software?
import java.io.InputStream; Complete software solutions from Concept to
import java.io.IOException; Code.
import java.io.DataInputStream; www.netgen.co.za
Free SA chat sites
/* Meet new friends in your city and chat, share
* @author Angelo Compagnucci, Francesco Maria Compagnucci photos and blog
motribe.mobi
*
Free Chat Rooms in SA
* angelo.compagnucci@xxxxxxxxx 1000s of Sexy Singles want to Chat to You. Get
* your Ideal Match Today!
* This program is free software; you can redistribute it and/or modify it under www.ChatSouthAfrica.com
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
public class ObjectInputStream1 {
private DataInputStream dis;
public ObjectInputStream1(InputStream is) {
this.dis = new DataInputStream(is);
}
public Object readObject()
throws
IOException,
ClassNotFoundException,
IllegalAccessException,
InstantiationException {
Object obj = (SerializableCLDC) Class.forName(dis.readUTF()).newInstance(); Recent Msgs:
((SerializableCLDC)obj).deSerialize(dis);
postgresql-pgsql-general/2011-04/msg00107.html
return obj;
kde-devel/2011-04/msg00010.html
}
wx-users/2011-04/msg00051.html
}
commits.gnome/2011-04/msg02993.html

---------------------------------------------------------- scm-fedora-commits/2011-04/msg01147.html

h2-database/2011-04/msg00059.html
import java.io.DataOutputStream;
import java.io.IOException; freeipa-devel/2011-04/msg00029.html
import java.io.DataInputStream; scm-fedora-commits/2011-04/msg01411.html

public class AltroVario implements SerializableCLDC {

private int a;
private String b;

/**
* Method serialize
*
*
* @param dos
*
@throws IOException
*
*/
public void serialize(DataOutputStream dos) throws IOException {
dos.writeInt(a);
dos.writeUTF(b);
}

/**
* Method deSerialize
*
*
* @param dis
*
@throws IOException
@throws ClassNotFoundException
@throws IllegalAccessException
@throws InstantiationException
*

2 of 3 4/8/2011 2:43 PM
I wrote a method for J2ME SERIALIZATION !!! - msg#00153 - java.sun.kvm http://osdir.com/ml/java.sun.kvm/2004-08/msg00153.html

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz & git.net are too!

Advertising by

3 of 3 4/8/2011 2:43 PM

Vous aimerez peut-être aussi