public class ByteSerializer extends Serializer
Constructor and Description |
---|
ByteSerializer() |
Modifier and Type | Method and Description |
---|---|
static int |
getUnsigned(java.nio.ByteBuffer buffer)
Reads a non-negative byte from the buffer that was written with
putUnsigned(ByteBuffer, int) . |
static void |
putUnsigned(java.nio.ByteBuffer buffer,
int value)
Writes the specified non-negative int to the buffer, cast as a byte.
|
java.lang.Byte |
readObjectData(java.nio.ByteBuffer buffer,
java.lang.Class type)
Reads an object from the buffer.
|
void |
writeObjectData(java.nio.ByteBuffer buffer,
java.lang.Object object)
Writes the object to the buffer.
|
isFinal, newInstance, readObject, setCanBeNull, writeObject
public java.lang.Byte readObjectData(java.nio.ByteBuffer buffer, java.lang.Class type)
Serializer
readObjectData
in class Serializer
public void writeObjectData(java.nio.ByteBuffer buffer, java.lang.Object object)
Serializer
writeObjectData
in class Serializer
object
- Cannot be null.public static void putUnsigned(java.nio.ByteBuffer buffer, int value)
public static int getUnsigned(java.nio.ByteBuffer buffer)
putUnsigned(ByteBuffer, int)
.