|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nothome.delta.ByteBufferSeekableSource
public class ByteBufferSeekableSource
Wraps a byte buffer as a source
| Constructor Summary | |
|---|---|
ByteBufferSeekableSource(byte[] source)
Constructs a new ByteArraySeekableSource. |
|
ByteBufferSeekableSource(ByteBuffer bb)
Constructs a new ByteArraySeekableSource. |
|
| Method Summary | |
|---|---|
void |
close()
|
int |
read(ByteBuffer dest)
Reads up to Buffer.remaining() bytes from the source,
returning the number of bytes read, or -1 if no bytes were read
and EOF was reached. |
void |
seek(long pos)
Sets the position for the next SeekableSource.read(ByteBuffer). |
String |
toString()
Returns a debug String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ByteBufferSeekableSource(byte[] source)
public ByteBufferSeekableSource(ByteBuffer bb)
| Method Detail |
|---|
public void seek(long pos)
throws IOException
SeekableSourceSeekableSource.read(ByteBuffer).
seek in interface SeekableSourceIOException
public int read(ByteBuffer dest)
throws IOException
SeekableSourceBuffer.remaining() bytes from the source,
returning the number of bytes read, or -1 if no bytes were read
and EOF was reached.
read in interface SeekableSourceIOException
public void close()
throws IOException
close in interface CloseableIOExceptionpublic String toString()
String.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||