class ByteToBitInput extends Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
bbuf
The bit buffer
|
(package private) int |
bpos
The position of the next bit to get from the byte buffer.
|
(package private) ByteInputBuffer |
in
The byte based input
|
Constructor and Description |
---|
ByteToBitInput(ByteInputBuffer in)
Instantiates a new 'ByteToBitInput' object that uses 'in' as the
underlying byte based input.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkBytePadding()
Checks for past errors in the decoding process by verifying the byte
padding with an alternating sequence of 0's and 1's.
|
(package private) void |
flush()
Flushes (i.e.
|
(package private) int |
readBit()
Reads from the bit stream one bit.
|
(package private) void |
setByteArray(byte[] buf,
int off,
int len)
Resets the underlying byte input to start a new segment.
|
ByteInputBuffer in
int bbuf
int bpos
ByteToBitInput(ByteInputBuffer in)
in
- The underlying byte based input.final int readBit()
public boolean checkBytePadding()
final void flush()
final void setByteArray(byte[] buf, int off, int len)
buf
- The byte array containing the byte data. If null the
current byte array is assumed.off
- The index of the first element in 'buf' to be decoded. If
negative the byte just after the previous segment is assumed, only
valid if 'buf' is null.len
- The number of bytes in 'buf' to be decoded. Any subsequent
bytes are taken to be 0xFF.Copyright © 2017 Open Microscopy Environment