public interface BitInputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
BIG_ENDIAN
constant for setting this stream's mode to big endian
|
static int |
LITTLE_ENDIAN
constant for setting this stream's mode to little endian
|
| Modifier and Type | Method and Description |
|---|---|
void |
align()
causes the read pointer to be moved to the beginning
of the next byte, remaining bits in the current byte
are discarded
|
boolean |
getBit()
reads one bit (as a boolean) from the input stream
|
int |
getInt(HuffmanNode root)
reads a huffman codeword based on the
root
parameter and returns the decoded value |
int |
getInt(int bits)
reads
bits number of bits from the input
stream |
long |
getLong(int bits)
reads
bits number of bits from the input
stream |
int |
getSignedInt(int bits)
reads
bits number of bits from the input
stream |
int |
readSignedRice(int order)
reads an integer encoded as "signed rice" as described in
the FLAC audio format specification
|
void |
readSignedRice(int order,
int[] buffer,
int offset,
int len)
fills the array from
offset with len
integers encoded as "signed rice" as described in
the FLAC audio format specification |
void |
setEndian(int endian)
changes the endian mode used when reading bit-wise from
the stream, changing the mode mid-stream will cause the
read cursor to move to the beginning of the next byte
(as if calling the
allign method |
static final int LITTLE_ENDIAN
setEndian(int),
Constant Field Valuesstatic final int BIG_ENDIAN
setEndian(int),
Constant Field Valuesboolean getBit()
throws java.io.IOException
true if the next bit is 1,
false otherwisejava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationint getInt(int bits)
throws java.io.IOException
bits number of bits from the input
streamjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationint getSignedInt(int bits)
throws java.io.IOException
bits number of bits from the input
streamjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationint getInt(HuffmanNode root) throws java.io.IOException
root
parameter and returns the decoded valueroot - the root of the Huffman tree used to decode the codewordjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationint readSignedRice(int order)
throws java.io.IOException
order - java.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationvoid readSignedRice(int order,
int[] buffer,
int offset,
int len)
throws java.io.IOException
offset with len
integers encoded as "signed rice" as described in
the FLAC audio format specificationorder - buffer - offset - len - java.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationlong getLong(int bits)
throws java.io.IOException
bits number of bits from the input
streamjava.io.IOException - if an I/O error occursjava.lang.UnsupportedOperationException - if the method is not supported by the implementationvoid align()
java.lang.UnsupportedOperationException - if the method is not supported by the implementationvoid setEndian(int endian)
allign methodjava.lang.UnsupportedOperationException - if the method is not supported by the implementationalign()Copyright © 2013 Tor-Einar Jarnbjo. All Rights Reserved.