public class AutoFlushingObjectWriter extends Objectimplements ObjectWriter
ObjectOutputStream immediately after calling it's
ObjectOutputStream.writeObject(Object) method.
| Constructor and Description |
|---|
AutoFlushingObjectWriter(ObjectOutputStream
Creates a new instance for the given
ObjectOutputStream.
|
public AutoFlushingObjectWriter(ObjectOutputStreamobjectOutputStream, int resetFrequency)
ObjectOutputStream.
objectOutputStream - the stream to write to
resetFrequency - the frequency with which the given stream will be automatically reset to prevent a memory leak
public void write(Objectobject) throws IOException
ObjectWriter
write in interface
ObjectWriter
object - the
Object to write
IOException - in case input/output fails, details are defined by the implementation