Re: Saving Serialized objects



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
.



Relevant Pages

  • Saving Serialized objects
    ... public class AddNum implements Serializable ... how can i save an object of this class utlizing serialization in the ... Christo ...
    (comp.lang.java)
  • Re: the c# return statement
    ... >> start worry about serialization of data over a network, ... > not control the memory in which it resides. ... seconds coming up with examples where switch statements would be useful. ...
    (microsoft.public.dotnet.general)
  • Re: In 2007 networks moving away from serials
    ... The 20 or so drama scripts on NBC's 2007-08 ... networks are hitting the tipping point on serialization, ... pitches and four drama scripts that have earned commitments. ... Serialized dramas exploded on network fall schedules after the success ...
    (rec.arts.tv)
  • Re: Client Server like program, which way is better?
    ... transport data structures over the network (aka Marshalling or ... Serialization). ...
    (comp.lang.java.programmer)
  • Re: High Speed Network Object Packing
    ... I didn't find any existing sample in the network which is fit for you exactly. ... "Object Serialization in Visual Basic .NET" ... Some other useful links include: ... Discussions on Serialization over NetworkStreams: ...
    (microsoft.public.dotnet.framework)