com.github.libxjava.io
Class BinarySerialiserStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.DataOutputStream
          extended by com.github.libxjava.io.BinarySerialiserStream
All Implemented Interfaces:
ISerialiser, DataOutput

public class BinarySerialiserStream
extends DataOutputStream
implements ISerialiser

Version:
libxjava-cldc - 0.3
Author:
Marcel Patzlaff

Field Summary
protected  int referenceCounter
           
 
Fields inherited from class java.io.DataOutputStream
out
 
Constructor Summary
BinarySerialiserStream(OutputStream out)
           
 
Method Summary
 void flush()
          Clears the internal serialisation graphs and flushes also the underlying outputstream.
protected  Byte getReferenceNumber(Object obj)
           
 void writeObject(Object o)
          Writes the given Object into this serialiser.
 
Methods inherited from class java.io.DataOutputStream
close, write, write, writeBoolean, writeByte, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Field Detail

referenceCounter

protected int referenceCounter
Constructor Detail

BinarySerialiserStream

public BinarySerialiserStream(OutputStream out)
Method Detail

flush

public void flush()
           throws IOException
Description copied from interface: ISerialiser
Clears the internal serialisation graphs and flushes also the underlying outputstream. This method should be called to finish a serialisation process and to reuse this instance for further serialisations.

Specified by:
flush in interface ISerialiser
Overrides:
flush in class DataOutputStream
Throws:
IOException - thrown from OutputStream.flush()

writeObject

public final void writeObject(Object o)
                       throws IOException
Description copied from interface: ISerialiser
Writes the given Object into this serialiser. Consult BinarySerialiserConstants for further information!

Specified by:
writeObject in interface ISerialiser
Parameters:
o - the Object to write.
Throws:
IOException - if problems occur while writing data

getReferenceNumber

protected Byte getReferenceNumber(Object obj)


Copyright © 2011 Marcel Patzlaff. All Rights Reserved.