|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BinarySerializable
The BinarySerializable
interface marks the implementing
class to be able to serialize itself into a stream of bytes provided
by the BinarySerializator
.
The class should be able to reconstruct itself from these data by providing either a constructor or a factory method. The factory method should have the following prototype:
ObjectClass binaryDeserialize(The constructor should have the following prototype:BinaryInput
input,BinarySerializator
serializator) throwsIOException
ClassConstructor(The access specificator of the construtor or the factory method is not important and can be even private.BinaryInput
input,BinarySerializator
serializator) throwsIOException
JavaToBinarySerializable
,
BinarySerializator
Method Summary | |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the output . |
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes. |
Method Detail |
---|
int getBinarySize(BinarySerializator serializator)
serializator
- the serializator used to write objects
int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
output
.
output
- the binary output that this object is serialized intoserializator
- the serializator used to write objects
java.io.IOException
- if there was an I/O error during serialization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |