uk.ac.cam.acr31.oggdecoder
Class RingBuffer
java.lang.Object
uk.ac.cam.acr31.oggdecoder.RingBuffer
public class RingBuffer
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bufferSize
private int bufferSize
buffer
private java.nio.ByteBuffer buffer
readPointer
private int readPointer
writePointer
private int writePointer
bytesRemaining
private int bytesRemaining
bytesAvailable
private int bytesAvailable
RingBuffer
public RingBuffer(int bufferSize)
getBytesRemaining
public int getBytesRemaining()
getBytesAvailable
public int getBytesAvailable()
write
public void write(byte[] data,
int off,
int len)
throws BufferOverflowException
- Throws:
BufferOverflowException
read
public int read(byte[] data,
int off,
int len)
throws BufferUnderflowException
- Throws:
BufferUnderflowException