Package gov.nih.mipav.model.file
Class jxlatte.Bitreader
java.lang.Object
java.io.InputStream
gov.nih.mipav.model.file.jxlatte.Bitreader
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
jxlatte
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanatEnd()voidclose()byte[]longintread()intread(byte[] buffer) intread(byte[] buffer, int offset, int length) intreadBits(int bits) booleanreadBool()intreadEnum()floatreadF16()intintreadU32(int c0, int u0, int c1, int u1, int c2, int u2, int c3, int u3) longreadU64()intreadU8()intshowBits(int bits) longskip(long bytes) longskipBits(long bits) voidMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
in
-
cache
private long cache -
cacheBits
private int cacheBits -
bitsRead
private long bitsRead
-
-
Constructor Details
-
Bitreader
-
-
Method Details
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
readBool
- Throws:
IOException
-
readU32
public int readU32(int c0, int u0, int c1, int u1, int c2, int u2, int c3, int u3) throws IOException - Throws:
IOException
-
readU64
- Throws:
IOException
-
readF16
- Throws:
IOException
-
readEnum
- Throws:
IOException
-
readU8
- Throws:
IOException
-
readICCVarint
- Throws:
IOException
-
atEnd
- Throws:
IOException
-
readBits
- Parameters:
bits- Reads 0-32 bits from the bitstream- Returns:
- the value of those bits
- Throws:
IOException
-
showBits
- Parameters:
bits- Reads 0-32 bits from the bitstream, but puts them back- Returns:
- the value of those bits
- Throws:
IOException
-
zeroPadToByte
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
skipBits
- Parameters:
bits- Skips any number of bits from the bitstream- Returns:
- The number of bits skipped
- Throws:
IOException
-
getBitsCount
public long getBitsCount() -
read
- Specified by:
readin classInputStream- Throws:
IOException
-
drainCache
- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-