| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | bigEndian
The true if we should be reading big endian |
| pack-priv byte[] | buffer
Temporary scratch buffer |
| private static final int | |
| pack-priv int | bytes
The number of bytes read |
| private Comment | comment
The comment read from the OGG file |
| private byte[] | convbuffer
The buffer used to read OGG file |
| private int | convsize
The conversion buffer size |
| private DspState | dspState
The Vorbis DSP stat eused to decode the OGG |
| pack-priv boolean | endOfBitStream
True if we're reached the end of the current bit stream |
| private boolean | endOfStream
True if we're at the end of the available data |
| pack-priv boolean | inited
True if we're initialise the OGG info block |
| private InputStream | input
The stream we're reading the OGG file from |
| private Info | oggInfo
The audio information from the OGG header |
| private Packet | packet
The current packet page |
| private Page | page
The current OGG page |
| private ByteBuffer | pcmBuffer
The byte array store used to hold the data read from the ogg |
| private int | readIndex
The index into the byte array we currently read from |
| private StreamState | streamState
The Vorbis Stream State used to decode the OGG |
| private SyncState | syncState
The Vorbis SyncState used to decode the OGG |
| private int | total
The total number of bytes |
| private Block | vorbisBlock
The OGG block we're currently working with to convert PCM |
| Access | Constructor and Description |
|---|---|
| public | OggInputStream(InputStream
The input stream from which to read the OGG file input)Create a new stream to decode OGG data |
| public | OggInputStream(InputStream
The input stream from which to read the OGG file input, OggInputStream The stream instance to reuse buffers from, may be null previousStream)Create a new stream to decode OGG data, reusing buffers from another stream. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| public int | |
| public int | |
| private boolean | |
| public int | |
| private void | |
| private void | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[] b, int off, int len)
Overrides java. Reads up to |
| public int | read(byte[] b)
Overrides java. Reads some number of bytes from the input stream and stores them into
the buffer array |
| private void |
| bigEndian | back to summary |
|---|---|
| pack-priv boolean bigEndian The true if we should be reading big endian | |
| buffer | back to summary |
|---|---|
| pack-priv byte[] buffer Temporary scratch buffer | |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| bytes | back to summary |
|---|---|
| pack-priv int bytes The number of bytes read | |
| comment | back to summary |
|---|---|
| private Comment comment The comment read from the OGG file | |
| convbuffer | back to summary |
|---|---|
| private byte[] convbuffer The buffer used to read OGG file | |
| convsize | back to summary |
|---|---|
| private int convsize The conversion buffer size | |
| dspState | back to summary |
|---|---|
| private DspState dspState The Vorbis DSP stat eused to decode the OGG | |
| endOfBitStream | back to summary |
|---|---|
| pack-priv boolean endOfBitStream True if we're reached the end of the current bit stream | |
| endOfStream | back to summary |
|---|---|
| private boolean endOfStream True if we're at the end of the available data | |
| inited | back to summary |
|---|---|
| pack-priv boolean inited True if we're initialise the OGG info block | |
| input | back to summary |
|---|---|
| private InputStream input The stream we're reading the OGG file from | |
| oggInfo | back to summary |
|---|---|
| private Info oggInfo The audio information from the OGG header | |
| packet | back to summary |
|---|---|
| private Packet packet The current packet page | |
| page | back to summary |
|---|---|
| private Page page The current OGG page | |
| pcmBuffer | back to summary |
|---|---|
| private ByteBuffer pcmBuffer The byte array store used to hold the data read from the ogg | |
| readIndex | back to summary |
|---|---|
| private int readIndex The index into the byte array we currently read from | |
| streamState | back to summary |
|---|---|
| private StreamState streamState The Vorbis Stream State used to decode the OGG | |
| syncState | back to summary |
|---|---|
| private SyncState syncState The Vorbis SyncState used to decode the OGG | |
| total | back to summary |
|---|---|
| private int total The total number of bytes | |
| vorbisBlock | back to summary |
|---|---|
| private Block vorbisBlock The OGG block we're currently working with to convert PCM | |
| OggInputStream | back to summary |
|---|---|
| public OggInputStream(InputStream input) Create a new stream to decode OGG data
| |
| OggInputStream | back to summary |
|---|---|
| public OggInputStream(InputStream input, OggInputStream previousStream) Create a new stream to decode OGG data, reusing buffers from another stream. It's not a good idea to use the old stream instance afterwards.
| |
| atEnd | back to summary |
|---|---|
| public boolean atEnd() | |
| available | back to summary |
|---|---|
| public int available() Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream. | |
| getChannels | back to summary |
|---|---|
| public int getChannels() | |
| getLength | back to summary |
|---|---|
| public int getLength() Get the number of bytes on the stream
| |
| getPageAndPacket | back to summary |
|---|---|
| private boolean getPageAndPacket() Get a page and packet from that page
| |
| getSampleRate | back to summary |
|---|---|
| public int getSampleRate() | |
| init | back to summary |
|---|---|
| private void init() Initialise the streams and thread involved in the streaming of OGG data | |
| initVorbis | back to summary |
|---|---|
| private void initVorbis() Initialise the vorbis decoding | |
| read | back to summary |
|---|---|
| public int read() Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an | |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements | |
| read | back to summary |
|---|---|
| public int read(byte[] b) Overrides java. Doc from java. Reads some number of bytes from the input stream and stores them into
the buffer array If the length of The first byte read is stored into element | |
| readPCM | back to summary |
|---|---|
| private void readPCM() Decode the OGG file as shown in the jogg/jorbis examples | |