|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kc7bfi.jflac.io.BitOutputStream
public class BitOutputStream
Bit-wide output stream.
Constructor Summary | |
---|---|
BitOutputStream()
The constructor. |
|
BitOutputStream(OutputStream os)
The constructor. |
Method Summary | |
---|---|
int |
bitsLeftForByteAlignment()
return the number of bits to read to align the byte. |
boolean |
concatenateAligned(BitOutputStream src)
Concatinate one InputBitStream to the end of this one. |
void |
flushByteAligned()
Flush bit stream after aligning byte boundry. |
int |
getInputBytesUnconsumed()
return the number of bytes left to read. |
short |
getReadCRC16()
return the read CRC-16 value. |
int |
getTotalBits()
Returns the totalBits. |
int |
getTotalBlurbs()
Returns the totalBlurbs. |
short |
getWriteCRC16()
return the write CRC-16 value. |
byte |
getWriteCRC8()
return the write CRC-8 value. |
boolean |
isByteAligned()
Test if the Bit Stream is byte aligned. |
boolean |
isConsumedByteAligned()
Test if the Bit Stream consumed bits is byte aligned. |
void |
resetReadCRC16(short seed)
Reset the read CRC-16 value. |
int |
riceBits(int val,
int parameter)
|
void |
writeByteBlock(byte[] vals,
int nvals)
|
void |
writeRawInt(int val,
int bits)
|
void |
writeRawUInt(boolean val,
int bits)
Write a true/false integer. |
void |
writeRawUInt(int val,
int bits)
|
void |
writeRawUIntLittleEndian(int val)
|
void |
writeRawULong(long val,
int bits)
|
void |
writeRiceSigned(int val,
int parameter)
|
void |
writeUnaryUnsigned(int val)
|
void |
writeUTF8UInt(int val)
|
void |
writeUTF8ULong(long val)
|
void |
writeZeroes(int bits)
Write zero bits. |
void |
zeroPadToByteBoundary()
Write zero bits to byte boundry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitOutputStream(OutputStream os)
os
- The InputStream to read bits frompublic BitOutputStream()
Method Detail |
---|
public boolean concatenateAligned(BitOutputStream src)
src
- The inputBitStream to copy
public void resetReadCRC16(short seed)
seed
- The initial CRC-16 valuepublic short getReadCRC16()
public short getWriteCRC16()
public byte getWriteCRC8()
public boolean isByteAligned()
public boolean isConsumedByteAligned()
public int bitsLeftForByteAlignment()
public int getInputBytesUnconsumed()
public void writeZeroes(int bits) throws IOException
bits
- The number of zero bits to write
IOException
- On write errorpublic void writeRawUInt(boolean val, int bits) throws IOException
val
- The true/false valuebits
- The bit size to write
IOException
- On write errorpublic void writeRawUInt(int val, int bits) throws IOException
IOException
public void writeRawInt(int val, int bits) throws IOException
IOException
public void writeRawULong(long val, int bits) throws IOException
IOException
public void writeRawUIntLittleEndian(int val) throws IOException
IOException
public void writeByteBlock(byte[] vals, int nvals) throws IOException
IOException
public void writeUnaryUnsigned(int val) throws IOException
IOException
public int riceBits(int val, int parameter)
public void writeRiceSigned(int val, int parameter) throws IOException
IOException
public void writeUTF8UInt(int val) throws IOException
IOException
public void writeUTF8ULong(long val) throws IOException
IOException
public void zeroPadToByteBoundary() throws IOException
IOException
- On error writing to bit streampublic void flushByteAligned() throws IOException
IOException
- On error writing.public int getTotalBits()
public int getTotalBlurbs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |