Package 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.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.h2.dev.util.BinaryArithmeticStream

`BinaryArithmeticStream.Huffman, BinaryArithmeticStream.In, BinaryArithmeticStream.Out`

## Field Summary

### Fields inherited from class org.h2.dev.util.BinaryArithmeticStream

`high, low, MAX_PROBABILITY`

## Constructor Summary

Constructors
Constructor
Description
`Out(OutputStream out)`

## Method Summary

Modifier and Type
Method
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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Out

public Out(OutputStream out)

## Method Details

### writeBit

public void writeBit(boolean value, int probability) throws IOException
Write a bit.

Parameters:
  `value` - the value
  `probability` - the probability that the value is true
Throws:
  `IOException`

### flush

public void flush() throws IOException
Flush the stream.

Throws:
  `IOException`

### writeGolomb

public void writeGolomb(int divisor, int value) throws IOException
Write the Golomb code of a value.

Parameters:
  `divisor` - the divisor
  `value` - the value
Throws:
  `IOException`