Class Serializers
java.lang.Object
com.complexible.common.primitives.Serializers
Provides support for serializing/deserializing object or primitive values to/from byte arrays. The generic interface
for object serialization is slightly different than primitive serializers since typically the size of a serialized
object changes based on contents. Primitive values on the other hand have fixed serialization size.
- Author:
- Evren Sirin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSerializer for primitive integer values.static final classstatic final classSerializes the given long to 8 bytes.static interfaceGeneric serializer interface for objects.static final classSerializes the given short to 2 bytes.static final classSerialize longs in an "Unsigned" form.static final classSerializes the given long to as many bytes as required. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Serializers.ObjectSerializer<BitSet> static final Serializers.IntSerializerstatic final Serializers.ObjectSerializer<com.carrotsearch.hppc.IntArrayList> static final Serializers.LittleEndianLongSerializerstatic final Serializers.LongSerializerstatic final Serializers.ShortSerializerstatic final Serializers.ObjectSerializer<String> Serializer for strings using UTF-8 encoding.static final Serializers.UnsignedLongSerializerstatic final Serializers.VarLongSerializer -
Method Summary
-
Field Details
-
INT
-
LONG
-
LITTLE_LONG
-
UNSIGNED_LONG
-
VAR_LONG
-
SHORT
-
STRING
Serializer for strings using UTF-8 encoding. Serialization does not include the length of the string so when deserializing the correct string length should be provided out-of-band. -
INT_ARRAY
-
BIT_SET
-
-
Method Details
-
main
- Throws:
Exception
-