Class Serializers.UnsignedLongSerializer
java.lang.Object
com.complexible.common.primitives.Serializers.UnsignedLongSerializer
- Enclosing class:
Serializers
Serialize longs in an "Unsigned" form. In reality, this encoding guarantees that the natural
sort matches unsigned lexicographic sort (i.e. -1 before 0, etc).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongdeserialize(byte[] bytes) longdeserialize(byte[] bytes, int offset) byte[]serialize(long value) voidserialize(long value, byte[] bytes, int offset)
-
Constructor Details
-
UnsignedLongSerializer
public UnsignedLongSerializer()
-
-
Method Details
-
serialize
public byte[] serialize(long value) -
serialize
public void serialize(long value, byte[] bytes, int offset) -
deserialize
public long deserialize(byte[] bytes) -
deserialize
public long deserialize(byte[] bytes, int offset)
-