public static class PositionKnownWrapper.Readable extends PositionKnownWrapper<IO.Readable> implements IO.Readable, IO.PositionKnown
| Modifier and Type | Class and Description |
|---|---|
static class |
PositionKnownWrapper.Readable.Buffered
Add the capability to known on which position we are on a Buffered Readable.
|
PositionKnownWrapper.ReadableIO.Readable.SeekableIO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.Implio, position| Constructor and Description |
|---|
Readable(IO.Readable io)
Constructor.
|
Readable(IO.Readable io,
long position)
Constructor with initial position.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
AsyncWork<Integer,IOException> |
readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Asynchronous read operation.
|
AsyncWork<Integer,IOException> |
readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Asynchronous read operation to fully fill the given buffer.
|
int |
readFullySync(ByteBuffer buffer)
Synchronous read operation to fully fill the given buffer.
|
int |
readSync(ByteBuffer buffer)
Read synchronously into the given buffer.
|
AsyncWork<Long,IOException> |
skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Returns the number of bytes skipped.
|
long |
skipSync(long n)
Returns the number of bytes skipped.
|
closeResources, closeUnderlyingResources, getPosition, getPriority, getSourceDescription, getTaskManager, getWrappedIO, read, read, readAsync, readFully, readNextBufferAsync, setPriority, skipaddCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAsync, readFullyAsync, skipAsyncgetPositionerror, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerpublic Readable(IO.Readable io, long position)
public Readable(IO.Readable io)
public ISynchronizationPoint<IOException> canStartReading()
IO.ReadablecanStartReading in interface IO.ReadablecanStartReading in class PositionKnownWrapper<IO.Readable>public int readSync(ByteBuffer buffer) throws IOException
IO.ReadablereadSync in interface IO.ReadablereadSync in class PositionKnownWrapper<IO.Readable>buffer - buffer to fillIOExceptionpublic AsyncWork<Integer,IOException> readAsync(ByteBuffer buffer, RunnableWithParameter<Pair<Integer,IOException>> ondone)
IO.ReadablereadAsync in interface IO.ReadablereadAsync in class PositionKnownWrapper<IO.Readable>buffer - buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.public int readFullySync(ByteBuffer buffer) throws IOException
IO.ReadablereadFullySync in interface IO.ReadablereadFullySync in class PositionKnownWrapper<IO.Readable>buffer - the buffer to fillIOExceptionpublic AsyncWork<Integer,IOException> readFullyAsync(ByteBuffer buffer, RunnableWithParameter<Pair<Integer,IOException>> ondone)
IO.ReadablereadFullyAsync in interface IO.ReadablereadFullyAsync in class PositionKnownWrapper<IO.Readable>buffer - the buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.public long skipSync(long n)
throws IOException
IO.ReadableskipSync in interface IO.ReadableskipSync in class PositionKnownWrapper<IO.Readable>IOExceptionpublic AsyncWork<Long,IOException> skipAsync(long n, RunnableWithParameter<Pair<Long,IOException>> ondone)
IO.ReadableskipAsync in interface IO.ReadableskipAsync in class PositionKnownWrapper<IO.Readable>Copyright © 2017. All rights reserved.