uk.ac.cam.acr31.oggdecoder
Class QueuedOggStream

java.lang.Object
  extended by uk.ac.cam.acr31.oggdecoder.OggStream
      extended by uk.ac.cam.acr31.oggdecoder.QueuedOggStream
All Implemented Interfaces:
BufferListenerable

public class QueuedOggStream
extends OggStream
implements BufferListenerable


Field Summary
private  BufferStatusListener bufferStatusListener
           
private  int BUFSIZE
           
private  byte[] current
           
private  OggStream mSource
           
private  java.util.concurrent.BlockingQueue<byte[]> q
           
private  java.util.concurrent.BlockingQueue<byte[]> q2
           
private  int QUEUEBYTES
           
private  int QUEUELEN
           
private  int readPointer
           
 
Constructor Summary
QueuedOggStream(OggStream source)
           
 
Method Summary
 void close()
           
private  void fill()
           
 void read(byte[] buf, int off, int len)
           
 void setBufferStatusListener(BufferStatusListener l)
           
 
Methods inherited from class uk.ac.cam.acr31.oggdecoder.OggStream
advance, read16, read32, read64, read8
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFSIZE

private final int BUFSIZE
See Also:
Constant Field Values

QUEUELEN

private final int QUEUELEN
See Also:
Constant Field Values

QUEUEBYTES

private final int QUEUEBYTES
See Also:
Constant Field Values

q

private java.util.concurrent.BlockingQueue<byte[]> q

q2

private java.util.concurrent.BlockingQueue<byte[]> q2

bufferStatusListener

private BufferStatusListener bufferStatusListener

mSource

private OggStream mSource

current

private byte[] current

readPointer

private int readPointer
Constructor Detail

QueuedOggStream

public QueuedOggStream(OggStream source)
Method Detail

fill

private void fill()
           throws EndOfStreamException,
                  InvalidStreamException
Throws:
EndOfStreamException
InvalidStreamException

close

public void close()
Specified by:
close in class OggStream

read

public void read(byte[] buf,
                 int off,
                 int len)
          throws EndOfStreamException,
                 InvalidStreamException
Specified by:
read in class OggStream
Throws:
EndOfStreamException
InvalidStreamException

setBufferStatusListener

public void setBufferStatusListener(BufferStatusListener l)
Specified by:
setBufferStatusListener in interface BufferListenerable