org.h2.dev.util
Class BinaryArithmeticStream.Out
java.lang.Object
org.h2.dev.util.BinaryArithmeticStream
org.h2.dev.util.BinaryArithmeticStream.Out
- Enclosing class:
- BinaryArithmeticStream
public static class BinaryArithmeticStream.Out
- extends BinaryArithmeticStream
A binary arithmetic output stream.
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryArithmeticStream.Out
public BinaryArithmeticStream.Out(java.io.OutputStream out)
writeBit
public void writeBit(boolean value,
int probability)
throws java.io.IOException
- Write a bit.
- Parameters:
value - the valueprobability - the probability that the value is true
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Flush the stream.
- Throws:
java.io.IOException
writeGolomb
public void writeGolomb(int divisor,
int value)
throws java.io.IOException
- Write the Golomb code of a value.
- Parameters:
divisor - the divisorvalue - the value
- Throws:
java.io.IOException