public interface Persistable
ByteBuffer
.Modifier and Type | Method and Description |
---|---|
void |
read(ByteBuffer buffer)
Reads the object from the given
ByteBuffer .Upon return from this method, the buffer's position will have advanced past the read data. |
int |
size()
Returns the size in bytes of the object's persisted form.
|
void |
write(ByteBuffer buffer)
Writes the object to the given
ByteBuffer .Upon return from this method, the buffer's position will have advanced past the written data. |
int size()
void write(ByteBuffer buffer)
ByteBuffer
.position
will have advanced past the written data.buffer
- The buffer to which the object is to be written.void read(ByteBuffer buffer)
ByteBuffer
.position
will have advanced past the read data.buffer
- The buffer from which the object is to be read.