Class BitInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- org.apache.commons.imaging.formats.tiff.datareaders.BitInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
final class BitInputStream extends java.io.FilterInputStreamInput stream reading 1-8, 16, 24 or 32 bits, starting from the most significant bit, but incapable of reading non-aligned and < 8 bit fields across byte boundaries.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteOrderbyteOrderprivate longbytesReadprivate intcacheprivate intcacheBitsRemaining
-
Constructor Summary
Constructors Constructor Description BitInputStream(java.io.InputStream is, java.nio.ByteOrder byteOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflushCache()longgetBytesRead()intread()intreadBits(int count)
-
-
-
Method Detail
-
flushCache
public void flushCache()
-
getBytesRead
public long getBytesRead()
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
readBits
public int readBits(int count) throws java.io.IOException- Throws:
java.io.IOException
-
-