Class ByteArrayUtil.VarintSerializer

  • All Implemented Interfaces:
    ByteBufferSerializer<java.lang.Integer>
    Enclosing class:
    ByteArrayUtil

    public static final class ByteArrayUtil.VarintSerializer
    extends java.lang.Object
    implements ByteBufferSerializer<java.lang.Integer>
    Serializer for Integer objects using a variable size encoding.
    Author:
    Erich Schubert
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private VarintSerializer()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.Integer fromByteBuffer​(java.nio.ByteBuffer buffer)
      Deprecated.
      int getByteSize​(java.lang.Integer object)
      Deprecated.
      void toByteBuffer​(java.nio.ByteBuffer buffer, java.lang.Integer obj)
      Deprecated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VarintSerializer

        private VarintSerializer()
        Constructor. Protected: use static instance!
    • Method Detail

      • fromByteBuffer

        @Deprecated
        public java.lang.Integer fromByteBuffer​(java.nio.ByteBuffer buffer)
                                         throws java.io.IOException
        Deprecated.
        Description copied from interface: ByteBufferSerializer
        Deserialize an object from a byte buffer (e.g., disk)
        Specified by:
        fromByteBuffer in interface ByteBufferSerializer<java.lang.Integer>
        Parameters:
        buffer - Data array to process
        Returns:
        Deserialized object
        Throws:
        java.io.IOException - on IO errors
      • toByteBuffer

        @Deprecated
        public void toByteBuffer​(java.nio.ByteBuffer buffer,
                                 java.lang.Integer obj)
        Deprecated.
        Description copied from interface: ByteBufferSerializer
        Serialize the object to a byte array (e.g., disk)
        Specified by:
        toByteBuffer in interface ByteBufferSerializer<java.lang.Integer>
        Parameters:
        buffer - Buffer to serialize to
        obj - Object to serialize
      • getByteSize

        @Deprecated
        public int getByteSize​(java.lang.Integer object)
        Deprecated.
        Description copied from interface: ByteBufferSerializer
        Get the size of the object in bytes.
        Specified by:
        getByteSize in interface ByteBufferSerializer<java.lang.Integer>
        Parameters:
        object - Object to serialize
        Returns:
        maximum size in serialized form