Class IntDecoder

    • Field Detail

      • EOS

        public static final long EOS
        A special long value which is used to indicate end-of-stream has reached.
        See Also:
        Constant Field Values
      • in

        protected InputStream in
        Input stream from which the encoded bytes are read
    • Constructor Detail

      • IntDecoder

        public IntDecoder()
    • Method Detail

      • reInit

        public void reInit​(InputStream in)
        Sets the input stream from which the encoded data is read.
      • decode

        public abstract long decode()
                             throws IOException
        Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, EOS is returned.
        Returns:
        one decoded integer as long or EOS if end-of-stream reached.
        Throws:
        IOException - if an I/O error occurs