Package htsjdk.samtools.cram.io
Interface BitInputStream
-
- All Known Implementing Classes:
DefaultBitInputStream
public interface BitInputStreamAn interface to describe the requirements for reading bit data as opposed to bytes. Implementors must keep track of the amount of data read similar toInputStreamconcept.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanreadBit()Reads a single bit from the stream.intreadBits(int length)Read specified number of bits from the stream.longreadLongBits(int length)Read specified number of bits from the stream.
-
-
-
Method Detail
-
readBit
boolean readBit() throws IOExceptionReads a single bit from the stream.- Throws:
IOException- as per streaming contract in java.
-
readBits
int readBits(int length) throws IOExceptionRead specified number of bits from the stream. The bits are return in an integer value.- Parameters:
length- number of bits to read- Throws:
IOException- as per streaming contract in java.
-
readLongBits
long readLongBits(int length) throws IOExceptionRead specified number of bits from the stream. The bits are return in a long value.- Parameters:
length- number of bits to read- Throws:
IOException- as per streaming contract in java.
-
-