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.Readable, LinkedIO.ReadWriteIO.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 |
|---|---|
IAsync<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
protected void |
nextIOAsync(Runnable ondone,
IAsync<IOException> onerror,
Consumer rp) |
protected void |
nextIOSync() |
protected void |
previousIOAsync(Runnable ondone,
IAsync<IOException> onerror,
Consumer rp) |
protected void |
previousIOSync() |
AsyncSupplier<Integer,IOException> |
readAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Asynchronous read operation.
|
AsyncSupplier<Integer,IOException> |
readFullyAsync(ByteBuffer buffer,
Consumer<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.
|
AsyncSupplier<Long,IOException> |
skipAsync(long n,
Consumer<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, readFullySyncIfPossible, readNextBuffer, readNextBufferAsync, readSync, seekAsync, seekSync, setPriority, skip, writeAsync, writeAsync, writeSync, writeSyncaddCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAsync, readFullyAsync, skipAsynccancelClosed, error, errorCancelled, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerpublic Readable(String description, IO.Readable... ios)
protected void nextIOSync()
throws IOException
nextIOSync in class LinkedIOIOExceptionprotected void nextIOAsync(Runnable ondone, IAsync<IOException> onerror, Consumer rp)
nextIOAsync in class LinkedIOprotected void previousIOSync()
throws IOException
previousIOSync in class LinkedIOIOExceptionprotected void previousIOAsync(Runnable ondone, IAsync<IOException> onerror, Consumer rp)
previousIOAsync in class LinkedIOpublic IAsync<IOException> canStartReading()
IO.ReadablecanStartReading in interface IO.ReadablecanStartReading in class LinkedIOpublic AsyncSupplier<Integer,IOException> readAsync(ByteBuffer buffer, Consumer<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 AsyncSupplier<Integer,IOException> readFullyAsync(ByteBuffer buffer, Consumer<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 AsyncSupplier<Long,IOException> skipAsync(long n, Consumer<Pair<Long,IOException>> ondone)
IO.ReadableskipAsync in interface IO.ReadableskipAsync in class LinkedIOCopyright © 2019. All rights reserved.