|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream jwo.utils.gifutils.BitOutputStream
BitOutputStream allows the writing of 1 to 32 bits at a time, on any bit boundary. Bits are written to bytes, least significant bit first.
Field Summary | |
protected int |
cachedBits
any cached bits which need to be written to the underlying stream |
protected int |
numCachedBits
the number of valid bits in 'cachedBits'. |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
BitOutputStream(OutputStream os)
|
Method Summary | |
void |
flush()
Flush any cached bits and bytes. |
void |
write(int byteValue)
Write a byte at the current bit boundary. |
void |
writeBit(int bit)
Write a single bit (1 or 0) to the underlying output stream. |
void |
writeBits(int value,
int numBits)
Write the given number of bits (1 to 32) from the given value to the underlying output stream. |
Methods inherited from class java.io.FilterOutputStream |
close, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int cachedBits
protected int numCachedBits
Constructor Detail |
public BitOutputStream(OutputStream os)
Method Detail |
public void write(int byteValue) throws IOException
IOException
public void writeBits(int value, int numBits) throws IOException
IOException
public void writeBit(int bit) throws IOException
IOException
public void flush() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |