|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javazoom.jl.decoder.Bitstream
public final class Bitstream
The 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.
Field Summary |
---|
Fields inherited from interface javazoom.jl.decoder.BitstreamErrors |
---|
BITSTREAM_LAST, INVALIDFRAME, STREAM_EOF, STREAM_ERROR, UNEXPECTED_EOF, UNKNOWN_ERROR, UNKNOWN_SAMPLE_RATE |
Fields inherited from interface javazoom.jl.decoder.JavaLayerErrors |
---|
BITSTREAM_ERROR, DECODER_ERROR |
Constructor Summary | |
---|---|
Bitstream(java.io.InputStream in)
Construct a IBitstream that reads data from a given InputStream. |
Method Summary | |
---|---|
void |
close()
Close the Bitstream. |
void |
closeFrame()
Close MP3 frame. |
int |
get_bits(int number_of_bits)
Read bits from buffer into the lower bits of an unsigned int. |
java.io.InputStream |
getRawID3v2()
Return raw ID3v2 frames + header. |
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,
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Bitstream(java.io.InputStream in)
in
- The InputStream to read from.Method Detail |
---|
public int header_pos()
public java.io.InputStream getRawID3v2()
public void close() throws BitstreamException
BitstreamException
public Header readFrame() throws BitstreamException
BitstreamException
public void unreadFrame() throws BitstreamException
BitstreamException
public void closeFrame()
public boolean isSyncCurrentPosition(int syncmode) throws BitstreamException
BitstreamException
public int readBits(int n)
public int readCheckedBits(int n)
protected BitstreamException newBitstreamException(int errorcode)
protected BitstreamException newBitstreamException(int errorcode, java.lang.Throwable throwable)
public boolean isSyncMark(int headerstring, int syncmode, int word)
public int get_bits(int number_of_bits)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |