xxl.io
Interface Convertable
- All Known Implementing Classes:
- KPE, KPEH, LocationalCode, Rectangle, Universe, AbstractConvertable, BitSet
- public abstract interface Convertable
This interface is a replacement for the Java Externalizable-interface
which does not accept raw data input-streams.
A class that implements this interface has to specify how its data
are to be serialized. The drawback of the Java-serialization mechanism
is that it writes
additional data to the stream which causes overhead.
|
Method Summary |
void |
read(java.io.DataInput dataInput)
Reads the state (the attributes) of an object from a given DataInput. |
int |
sizeOf()
Returns the number of bytes that are used to serialize this
Object. |
int |
write(java.io.DataOutput dataOutput)
Writes the state (the attributes) of an object to a given DataOutput. |
read
public void read(java.io.DataInput dataInput)
throws java.io.IOException
- Reads the state (the attributes) of an object from a given DataInput.
write
public int write(java.io.DataOutput dataOutput)
throws java.io.IOException
- Writes the state (the attributes) of an object to a given DataOutput.
Returns the number of bytes that were written.
sizeOf
public int sizeOf()
- Returns the number of bytes that are used to serialize this
Object.