Class PackedDataInputStream

All Implemented Interfaces:
Closeable, DataInput, AutoCloseable

class PackedDataInputStream extends DataInputStream
An input stream that reads integers that were packed by PackedDataOutputStream

Thread-Safety

This class is not thread-safe can not be shared between threads.
  • Field Details

  • Constructor Details

    • PackedDataInputStream

      public PackedDataInputStream(InputStream in)
  • Method Details

    • readPackedU32

      public int readPackedU32() throws IOException
      Reads a packed unsigned integer. Every byte uses the first bit as a control bit to signal when there are additional bytes to be read. The remaining seven bits are data. Depending on the size of the number one to five bytes may be read.
      Returns:
      the unpacked integer
      Throws:
      IOException