V
- The type of the elements of the list.public abstract class ReadWriteableListBinary<V> extends Object implements ReadableBinary, WriteableBinary
Constructor and Description |
---|
ReadWriteableListBinary(List<V> list)
Construct with the given list.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
protected abstract V |
readValue(DataInput in) |
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
protected abstract void |
writeValue(V v,
DataOutput out) |
public ReadWriteableListBinary(List<V> list)
list
- The list.public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outprotected abstract void writeValue(V v, DataOutput out) throws IOException
IOException
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputprotected abstract V readValue(DataInput in) throws IOException
IOException
public byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary