Class BitInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.imaging.formats.tiff.datareaders.BitInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Input stream reading 1-8, 16, 24 or 32 bits, starting from the most
significant bit, but incapable of reading non-aligned and
invalid input: '<' 8 bit fields across byte boundaries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteOrder
private long
private int
private int
private final InputStream
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
-
Field Details
-
is
-
byteOrder
-
cache
private int cache -
cacheBitsRemaining
private int cacheBitsRemaining -
bytesRead
private long bytesRead
-
-
Constructor Details
-
BitInputStream
BitInputStream(InputStream is, ByteOrder byteOrder)
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
readBits
- Throws:
IOException
-
flushCache
public void flushCache() -
getBytesRead
public long getBytesRead()
-