Class VarintDataInStream


  • public class VarintDataInStream
    extends Object
    Wrapper around a InStream that can read bytes and varints and a signed varint
    • Constructor Summary

      Constructors 
      Constructor Description
      VarintDataInStream()
      Constructor allowing to set the stream later, will NPE if the stream is not set
      VarintDataInStream​(InStream stream)
      Builds the varint data stream with the given stream
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte readByte()
      Reads a byte
      int readSignedInt()
      Reads an signed varinteger
      long readSignedLong()
      Reads an signed 64-bit varinteger
      int readUnsignedInt()
      Reads an un-signed varinteger
      void setInStream​(InStream stream)
      Sets a new InStream to delegate reads to
      • Methods inherited from class Object

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

      • VarintDataInStream

        public VarintDataInStream()
        Constructor allowing to set the stream later, will NPE if the stream is not set
      • VarintDataInStream

        public VarintDataInStream​(InStream stream)
        Builds the varint data stream with the given stream
    • Method Detail

      • setInStream

        public void setInStream​(InStream stream)
        Sets a new InStream to delegate reads to
      • readByte

        public byte readByte()
                      throws IOException
        Reads a byte
        Throws:
        IOException
      • readUnsignedInt

        public int readUnsignedInt()
                            throws IOException
        Reads an un-signed varinteger
        Throws:
        IOException
      • readSignedInt

        public int readSignedInt()
                          throws IOException
        Reads an signed varinteger
        Throws:
        IOException
      • readSignedLong

        public long readSignedLong()
                            throws IOException
        Reads an signed 64-bit varinteger
        Throws:
        IOException