Package com.complexible.common.primitives

# Class Serializers.UnsignedLongSerializer

java.lang.Object
com.complexible.common.primitives.Serializers.UnsignedLongSerializer

Enclosing class:
  `Serializers`

public static final class Serializers.UnsignedLongSerializer extends Object
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
  Constructor
  Description
  `UnsignedLongSerializer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `deserialize(byte[] bytes)`
  `long`
  `deserialize(byte[] bytes, int offset)`
  `byte[]`
  `serialize(long value)`
  `void`
  `serialize(long value, byte[] bytes, int offset)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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)