javazoom.jl.decoder
public final class Bitstream extends Object implements BitstreamErrors
Bistream
class is responsible for parsing
an MPEG audio bitstream.
REVIEW: much of the parsing currently occurs in the
various decoders. This should be moved into this class and associated
inner classes.
Constructor Summary | |
---|---|
Bitstream(InputStream in)
Construct a IBitstream that reads data from a
given InputStream.
|
Method Summary | |
---|---|
void | close()
Close the Bitstream. |
void | closeFrame()
Close MP3 frame. |
InputStream | getRawID3v2()
Return raw ID3v2 frames + header. |
int | get_bits(int number_of_bits)
Read bits from buffer into the lower bits of an unsigned int.
|
int | header_pos()
Return position of the first audio header. |
boolean | isSyncCurrentPosition(int syncmode)
Determines if the next 4 bytes of the stream represent a
frame header. |
boolean | isSyncMark(int headerstring, int syncmode, int word) |
protected BitstreamException | newBitstreamException(int errorcode) |
protected BitstreamException | newBitstreamException(int errorcode, Throwable throwable) |
int | readBits(int n) |
int | readCheckedBits(int n) |
Header | readFrame()
Reads and parses the next frame from the input source. |
void | unreadFrame()
Unreads the bytes read from the frame. |
Parameters: in The InputStream to read from.
Throws: BitstreamException
Returns: ID3v2 InputStream or null if ID3v2 frames are not available.
Returns: size of ID3v2 tag frames.
Returns: the Header describing details of the frame read, or null if the end of the stream has been reached.
Throws: BitstreamException