public static class BinaryArithmeticStream.Out extends BinaryArithmeticStream
BinaryArithmeticStream.Huffman, BinaryArithmeticStream.In, BinaryArithmeticStream.Outhigh, low, MAX_PROBABILITY| Constructor and Description |
|---|
Out(java.io.OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flush the stream.
|
void |
writeBit(boolean value,
int probability)
Write a bit.
|
void |
writeGolomb(int divisor,
int value)
Write the Golomb code of a value.
|
public void writeBit(boolean value,
int probability)
throws java.io.IOException
value - the valueprobability - the probability that the value is truejava.io.IOExceptionpublic void flush()
throws java.io.IOException
java.io.IOExceptionpublic void writeGolomb(int divisor,
int value)
throws java.io.IOException
divisor - the divisorvalue - the valuejava.io.IOException