public abstract class AbstractRingBuffer extends AbstractPipe
| Constructor and Description |
|---|
AbstractRingBuffer(long capacity) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
get(long pos,
byte[] buf,
int off,
int len)
Transfers
len bytes from the backing store to buf[off].... |
boolean |
isEmpty() |
boolean |
isFull() |
abstract void |
put(byte[] buf,
int off,
int len,
long pos)
Transfers
len bytes from buf[off]... to the backing store. |
int |
read(byte[] buf,
int off,
int len) |
int |
write(byte[] buf,
int off,
int len) |
finalizepublic abstract void get(long pos,
byte[] buf,
int off,
int len)
throws java.io.IOException
len bytes from the backing store to buf[off]....pos - 0...capacityoff - 0...buf.lengthlen - 0...min(capacity - pos, buf.length - offjava.io.IOExceptionAbstractRingBuffer(long)public abstract void put(byte[] buf,
int off,
int len,
long pos)
throws java.io.IOException
len bytes from buf[off]... to the backing store.off - 0...buf.lengthlen - 0...min(capacity - pos, buf.length - offpos - 0...capacityjava.io.IOExceptionAbstractRingBuffer(long)public final int read(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic final int write(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic final boolean isEmpty()
Pipe.read(byte[], int, int) will return 0public final boolean isFull()
Pipe.write(byte[], int, int) will return 0