Package org.apache.lucene.util.packed

# Class PackedDataOutput

java.lang.Object
org.apache.lucene.util.packed.PackedDataOutput

public final class PackedDataOutput extends Object
A `DataOutput` wrapper to write unaligned, variable-length packed integers.

See Also:
  - `PackedDataInput`
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

## Constructor Summary

Constructors
Constructor
Description
`PackedDataOutput(DataOutput out)`
Create a new instance that wraps `out`.

## Method Summary

Modifier and Type
Method
Description
`void`
`flush()`
Flush pending bits to the underlying `DataOutput`.
`void`
`writeLong(long value, int bitsPerValue)`
Write a value using exactly `bitsPerValue` bits.

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

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

## Constructor Details

### PackedDataOutput

public PackedDataOutput(DataOutput out)
Create a new instance that wraps `out`.

## Method Details

### writeLong

public void writeLong(long value, int bitsPerValue) throws IOException
Write a value using exactly `bitsPerValue` bits.

Throws:
  `IOException`

### flush

public void flush() throws IOException
Flush pending bits to the underlying `DataOutput`.

Throws:
  `IOException`