xxl.io
Class AbstractConvertable
java.lang.Object
|
+--xxl.io.AbstractConvertable
- public abstract class AbstractConvertable
- extends java.lang.Object
- implements 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 Java-serialization mechanism writes
additional data to the stream which causes overhead.
|
Method Summary |
abstract 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. |
abstract int |
write(java.io.DataOutput dataOutput)
Writes the state (the attributes) of an object to a given DataOutput. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AbstractConvertable
public AbstractConvertable()
read
public abstract void read(java.io.DataInput dataInput)
throws java.io.IOException
- Reads the state (the attributes) of an object from a given DataInput.
- Specified by:
- read in interface Convertable
write
public abstract int write(java.io.DataOutput dataOutput)
throws java.io.IOException
- Writes the state (the attributes) of an object to a given DataOutput.
- Specified by:
- write in interface Convertable
sizeOf
public int sizeOf()
- Returns the number of bytes that are used to serialize this
Object.
- Specified by:
- sizeOf in interface Convertable