public static class LinkedIO.Readable extends LinkedIO implements IO.Readable
| Modifier and Type | Class and Description |
|---|---|
static class |
LinkedIO.Readable.Buffered
Linked Readable Buffered IO.
|
static class |
LinkedIO.Readable.DeterminedSize
Linked Readable IO and add the DeterminedSize capability.
|
static class |
LinkedIO.Readable.Seekable
Linked Readable Seekable IO.
|
LinkedIO.ReadableIO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.Impl| Constructor and Description |
|---|
Readable(String description,
IO.Readable... ios)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
protected void |
nextIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
nextIOSync() |
protected void |
previousIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
previousIOSync() |
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.
|
canStartWriting, closeResources, closeUnderlyingResources, getPosition, getPriority, getSizeAsync, getSizeSync, getSourceDescription, getTaskManager, getWrappedIO, nextIOAsyncSeekable, nextIOAsyncStream, nextIOSyncSeekable, nextIOSyncStream, previousIOAsyncSeekable, previousIOAsyncStream, previousIOSyncSeekable, previousIOSyncStream, read, read, readAsync, readAsync, readFully, readFullyAsync, readFullySync, readNextBufferAsync, readSync, seekAsync, seekSync, setPriority, skipaddCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAsync, readFullyAsync, skipAsyncerror, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerpublic Readable(String description, IO.Readable... ios)
protected void nextIOSync()
throws IOException
nextIOSync in class LinkedIOIOExceptionprotected void nextIOAsync(Runnable ondone, ISynchronizationPoint<IOException> onerror, RunnableWithParameter rp)
nextIOAsync in class LinkedIOprotected void previousIOSync()
throws IOException
previousIOSync in class LinkedIOIOExceptionprotected void previousIOAsync(Runnable ondone, ISynchronizationPoint<IOException> onerror, RunnableWithParameter rp)
previousIOAsync in class LinkedIOpublic ISynchronizationPoint<IOException> canStartReading()
IO.ReadablecanStartReading in interface IO.ReadablecanStartReading in class LinkedIOpublic AsyncWork<Integer,IOException> readAsync(ByteBuffer buffer, RunnableWithParameter<Pair<Integer,IOException>> ondone)
IO.ReadablereadAsync in interface IO.ReadablereadAsync in class LinkedIObuffer - buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.public AsyncWork<Integer,IOException> readFullyAsync(ByteBuffer buffer, RunnableWithParameter<Pair<Integer,IOException>> ondone)
IO.ReadablereadFullyAsync in interface IO.ReadablereadFullyAsync in class LinkedIObuffer - the buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.public int readSync(ByteBuffer buffer) throws IOException
IO.ReadablereadSync in interface IO.ReadablereadSync in class LinkedIObuffer - buffer to fillIOExceptionpublic int readFullySync(ByteBuffer buffer) throws IOException
IO.ReadablereadFullySync in interface IO.ReadablereadFullySync in class LinkedIObuffer - the buffer to fillIOExceptionpublic long skipSync(long n)
throws IOException
IO.ReadableskipSync in interface IO.ReadableskipSync in class LinkedIOIOExceptionpublic AsyncWork<Long,IOException> skipAsync(long n, RunnableWithParameter<Pair<Long,IOException>> ondone)
IO.ReadableskipAsync in interface IO.ReadableskipAsync in class LinkedIOCopyright © 2018. All rights reserved.