|
EXIficient | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.siemens.ct.exi.io.BitOutputStream
public class BitOutputStream
Write bits and bytes to an underlying output stream.
Field Summary | |
---|---|
static int |
BITS_IN_BYTE
|
Constructor Summary | |
---|---|
BitOutputStream(java.io.OutputStream ostream)
Constructs an instance of this class. |
Method Summary | |
---|---|
void |
align()
If there are some unwritten bits, pad them if necessary and write them out. |
void |
flush()
If there are some unwritten bits, pad them if necessary and write them out. |
int |
getBitsInBuffer()
Returns the number of bits that haven't been flushed. |
java.io.OutputStream |
getUnderlyingOutputStream()
Returns a reference to underlying output stream. |
boolean |
isByteAligned()
Returns true if stream is on a byte boundary, i.e. if no bits have been buffered since the last byte was written to underlying stream. |
void |
write(int b)
|
void |
writeBit0()
Write a single bit 0. |
void |
writeBit1()
Write a single bit 1. |
void |
writeBits(int b,
int n)
Write the n least significant bits of parameter b starting with the most significant, i.e. from left to right. |
Methods inherited from class java.io.OutputStream |
---|
close, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BITS_IN_BYTE
Constructor Detail |
---|
public BitOutputStream(java.io.OutputStream ostream)
Method Detail |
---|
public java.io.OutputStream getUnderlyingOutputStream()
public boolean isByteAligned()
public int getBitsInBuffer()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void align() throws java.io.IOException
java.io.IOException
public void writeBit0() throws java.io.IOException
java.io.IOException
public void writeBit1() throws java.io.IOException
java.io.IOException
public void writeBits(int b, int n) throws java.io.IOException
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
|
EXIficient | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |