Class BitInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class BitInputStream extends NonBlockingBitInputStream
The BitInputStream allows reading individual bits from a general Java InputStream. Like the various Stream-classes from Java, the BitInputStream has to be created based on another Input stream. It provides a function to read the next bit from the stream, as well as to read multiple bits at once and write the resulting data into an integer value.
For a non-blocking version see NonBlockingBitInputStream.
Author:
Andreas Jakl, Philip Helger
  • Constructor Details

    • BitInputStream

      public BitInputStream(@Nonnull InputStream aIS, @Nonnull ByteOrder aByteOrder)
      Create a new bit input stream based on an existing Java InputStream.
      Parameters:
      aIS - the input stream this class should read the bits from. May not be null.
      aByteOrder - The non-null byte order to use.
  • Method Details