public abstract class Serializable
extends java.lang.Object
ByteBuf,
to send and receive objects of this type| Constructor and Description |
|---|
Serializable() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
byteBufSize() |
abstract void |
fromByteBuf(io.netty.buffer.ByteBuf buffer)
Fills this object with the data from the
ByteBuf. |
io.netty.buffer.ByteBuf |
toByteBuf()
Creates a
ByteBuf and stores inside it the data
of this object. |
abstract void |
toByteBuf(io.netty.buffer.ByteBuf buffer)
Writes the data of this object into the
ByteBuf. |
public abstract int byteBufSize()
public abstract void toByteBuf(io.netty.buffer.ByteBuf buffer)
ByteBuf.buffer - buffer to store the datapublic io.netty.buffer.ByteBuf toByteBuf()
ByteBuf and stores inside it the data
of this object.ByteBuf with the object serializedpublic abstract void fromByteBuf(io.netty.buffer.ByteBuf buffer)
throws DataNotRepresentsObject
ByteBuf.
If the buffer contents doesn't match the object specification,
should throw IllegalArgumentException.buffer - buffer with the dataDataNotRepresentsObject - If the buffer data doesn't
represent the object