# Interface BitInputStream

All Superinterfaces:
  `AutoCloseable, Closeable`

All Known Implementing Classes:
  `DefaultBitInputStream`

public interface BitInputStream extends Closeable
An interface to describe the requirements for reading bit data as opposed to bytes. Implementors must keep track of the amount of data read similar to `InputStream` concept.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`readBit()`
Reads a single bit from the stream.
`int`
`readBits(int length)`
Read specified number of bits from the stream.
`long`
`readLongBits(int length)`
Read specified number of bits from the stream.

### Methods inherited from interface Closeable

`close`

## Method Details

### readBit

boolean readBit()
Reads a single bit from the stream.

### readBits

int readBits(int length)
Read specified number of bits from the stream. The bits are return in an integer value.

Parameters:
  `length` - number of bits to read

### readLongBits

long readLongBits(int length)
Read specified number of bits from the stream. The bits are return in a long value.

Parameters:
  `length` - number of bits to read