public class BitInputStream extends Object
| Constructor and Description |
|---|
BitInputStream(InputStream stream)
Constructor for this stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
This method returns approximate number of bits which are available to read.
|
void |
close()
Releases the resources hold by this instance.
|
int |
read()
Reads next 1 bit of available data.
|
int |
read(byte[] b,
int bitsPerValue,
int length)
This method breaks the back-end stream into data samples
each having "bitsPerValue" number of bits and writes length number of samples
to the byte array passed.
|
int |
read(int nob)
Reads nob number of bits from available data and returns an integer value.
|
int |
read(int[] b,
int bitsPerValue,
int length)
This method breaks the back-end stream into data samples
each having "bitsPerValue" number of bits and writes length number of samples
to the byte array passed.
|
long |
skip(long n)
This method skips n number of bits from available data.
|
public BitInputStream(InputStream stream) throws IOException
stream - This stream is used as back-end stream to read bit by bit data.IOExceptionpublic int read(int nob)
throws IOException
IOException if end of stream has been reached.nob - IOExceptionpublic int read()
throws IOException
IOException if end of stream has been reached.IOExceptionpublic void close()
throws IOException
IOExceptionpublic long skip(long n)
throws IOException
IOExceptionpublic int read(byte[] b,
int bitsPerValue,
int length)
b - bitsPerValue - public int read(int[] b,
int bitsPerValue,
int length)
b - bitsPerValue - public int available()
throws IOException
IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved