public class BitOutputStream extends Object
| Constructor and Description |
|---|
BitOutputStream()
The constructor.
|
BitOutputStream(OutputStream os)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public BitOutputStream(OutputStream os)
os - The InputStream to read bits frompublic BitOutputStream()
public boolean concatenateAligned(BitOutputStream src)
src - The inputBitStream to copypublic 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 writeIOException - On write errorpublic void writeRawUInt(boolean val,
int bits)
throws IOException
val - The true/false valuebits - The bit size to writeIOException - On write errorpublic void writeRawUInt(int val,
int bits)
throws IOException
IOExceptionpublic void writeRawInt(int val,
int bits)
throws IOException
IOExceptionpublic void writeRawULong(long val,
int bits)
throws IOException
IOExceptionpublic void writeRawUIntLittleEndian(int val)
throws IOException
IOExceptionpublic void writeByteBlock(byte[] vals,
int nvals)
throws IOException
IOExceptionpublic void writeUnaryUnsigned(int val)
throws IOException
IOExceptionpublic int riceBits(int val,
int parameter)
public void writeRiceSigned(int val,
int parameter)
throws IOException
IOExceptionpublic void writeUTF8UInt(int val)
throws IOException
IOExceptionpublic void writeUTF8ULong(long val)
throws IOException
IOExceptionpublic 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()
Copyright © 2004–2017. All rights reserved.