public class LongSerializer extends Serializer
Constructor and Description |
---|
LongSerializer() |
LongSerializer(boolean optimizePositive) |
Modifier and Type | Method and Description |
---|---|
static long |
get(java.nio.ByteBuffer buffer,
boolean optimizePositive)
Reads a long from the buffer that was written with
put(ByteBuffer, long, boolean) . |
static int |
put(java.nio.ByteBuffer buffer,
long value,
boolean optimizePositive)
Writes the specified long to the buffer using 1 to 10 bytes, depending on the size of the number.
|
java.lang.Long |
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 LongSerializer()
public LongSerializer(boolean optimizePositive)
public java.lang.Long 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 int put(java.nio.ByteBuffer buffer, long value, boolean optimizePositive)
optimizePositive
- See LongSerializer(boolean)
.public static long get(java.nio.ByteBuffer buffer, boolean optimizePositive)
put(ByteBuffer, long, boolean)
.