Interface CRAMCodec<T>

  • Type Parameters:
    T - data series type to be read or written
    All Known Implementing Classes:
    BetaIntegerCodec, CoreCodec, ExternalByteArrayCodec

    public interface CRAMCodec<T>
    An interface that defines requirements for serializing/deserializing objects into and from a stream.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T read()
      Read a single object from the stream
      T read​(int length)
      Read a array of specified length from the stream
      void write​(T value)
      Write an object to the stream
    • Method Detail

      • read

        T read()
        Read a single object from the stream
        Returns:
        an object from the stream
      • read

        T read​(int length)
        Read a array of specified length from the stream
        Parameters:
        length - the number of elements to read
        Returns:
        an object from the stream
      • write

        void write​(T value)
        Write an object to the stream
        Parameters:
        value - the object to write