public class BitStream extends Object implements IBitStream
Modifier and Type | Field and Description |
---|---|
protected int |
bitsCached |
protected int |
position |
Constructor and Description |
---|
BitStream() |
Modifier and Type | Method and Description |
---|---|
void |
byteAlign() |
static BitStream |
createBitStream(byte[] data) |
void |
destroy() |
int |
getBitsLeft() |
int |
getPosition() |
int |
maskBits(int n) |
int |
peekBit() |
int |
peekBits(int n) |
int |
readBit() |
int |
readBits(int n) |
boolean |
readBool() |
protected int |
readCache(boolean peek)
Reads the next four bytes.
|
void |
reset() |
void |
setData(byte[] data) |
void |
skipBit() |
void |
skipBits(int n) |
public static BitStream createBitStream(byte[] data)
public void destroy()
destroy
in interface IBitStream
public final void setData(byte[] data)
setData
in interface IBitStream
public void byteAlign() throws AACException
byteAlign
in interface IBitStream
AACException
public final void reset()
reset
in interface IBitStream
public int getPosition()
getPosition
in interface IBitStream
public int getBitsLeft()
getBitsLeft
in interface IBitStream
protected int readCache(boolean peek) throws AACException
peek
- if true, the stream pointer will not be increasedAACException
public int readBits(int n) throws AACException
readBits
in interface IBitStream
AACException
public int readBit() throws AACException
readBit
in interface IBitStream
AACException
public boolean readBool() throws AACException
readBool
in interface IBitStream
AACException
public int peekBits(int n) throws AACException
peekBits
in interface IBitStream
AACException
public int peekBit() throws AACException
peekBit
in interface IBitStream
AACException
public void skipBits(int n) throws AACException
skipBits
in interface IBitStream
AACException
public void skipBit() throws AACException
skipBit
in interface IBitStream
AACException
public int maskBits(int n)
maskBits
in interface IBitStream
Copyright © 2019. All rights reserved.