Re: Saving Serialized objects
- From: Grzegorz Kaczor <grzegorz.kaczor@xxxxxxxxx>
- Date: Mon, 24 Apr 2006 08:12:41 +0200
Christo wrote:
ok i need serious help
Im using this as a basic example
lets say i have a class
public class AddNum implements Serializable
{
public int mCount;
AddNum()
{
mCount = 0;
}
public void Add()
{
mCount++;
}
}
how can i save an object of this class utlizing serialization in the
process?
Use ObjectOutputStream.
But please note one thing: If you have a network of objects, every one
referencing some others, and you serialize all the network, every object
will be saved only once in the stream. This can be sometimes annoying.
Best Regards,
Grzegorz Kaczor
.
- References:
- Saving Serialized objects
- From: Christo
- Saving Serialized objects
- Prev by Date: Re: How to get available functions for an applet (that can be accessed in javascript) ?
- Next by Date: Re: simplest problem ever
- Previous by thread: Saving Serialized objects
- Index(es):
Relevant Pages
|