class BitToByteOutput 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 put in the bit buffer.
|
(package private) boolean |
delFF
Flag that indicates if an FF has been delayed
|
private boolean |
isPredTerm
Whether or not predictable termination is requested.
|
(package private) int |
nb
The number of written bytes (excluding the bit buffer)
|
(package private) ByteOutputBuffer |
out
The byte based output
|
(package private) static int |
PAD_SEQ
The alternating sequence of 0's and 1's used for byte padding
|
Constructor and Description |
---|
BitToByteOutput(ByteOutputBuffer out)
Instantiates a new 'BitToByteOutput' object that uses 'out' as the
underlying byte based output.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
flush()
Writes the contents of the bit buffer and byte aligns the output by
filling bits with an alternating sequence of 0's and 1's.
|
(package private) int |
length()
Returns the length, in bytes, of the output bit stream as written by
this object.
|
(package private) void |
reset()
Resets the bit buffer to empty, without writing anything to the
underlying byte output, and resets the byte count.
|
(package private) void |
setPredTerm(boolean isPredTerm)
Set the flag according to whether or not the predictable termination is
requested.
|
int |
terminate()
Terminates the bit stream by calling 'flush()' and then 'reset()'.
|
(package private) void |
writeBit(int bit)
Write a bit to the output.
|
(package private) void |
writeBits(int[] symbuf,
int nsym)
Writes to the bit stream the symbols contained in the 'symbuf'
buffer.
|
private boolean isPredTerm
static final int PAD_SEQ
boolean delFF
ByteOutputBuffer out
int bbuf
int bpos
int nb
BitToByteOutput(ByteOutputBuffer out)
out
- The underlying byte based outputfinal void writeBits(int[] symbuf, int nsym)
symbuf
- The symbols to writensym
- The number of symbols in symbuffinal void writeBit(int bit)
bit
- void flush()
public int terminate()
void reset()
int length()
void setPredTerm(boolean isPredTerm)
isPredTerm
- Whether or not predictable termination is requested.Copyright © 2015 Open Microscopy Environment