public static class SubIO.Readable extends SubIO implements IO.Readable
| Modifier and Type | Class and Description |
|---|---|
static class |
SubIO.Readable.Seekable
Sub-part of a Seekable Readable IO.
|
SubIO.Readable, SubIO.ReadWrite, SubIO.WritableIO.Readable.BufferedIO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.ImplcloseContainer, description, io, pos, size, start| Constructor and Description |
|---|
Readable(IO.Readable src,
long size,
String description,
boolean closeSrcOnClose)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IAsync<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
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, readAsync, readFullyAsync, readFullySync, readSync, seekAsync, seekSync, setPriority, 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(IO.Readable src, long size, String description, boolean closeSrcOnClose)
public IAsync<IOException> canStartReading()
IO.ReadablecanStartReading in interface IO.ReadablecanStartReading in class SubIOpublic int readSync(ByteBuffer buffer) throws IOException
IO.ReadablereadSync in interface IO.ReadablereadSync in class SubIObuffer - buffer to fillIOExceptionpublic AsyncSupplier<Integer,IOException> readAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
IO.ReadablereadAsync in interface IO.ReadablereadAsync in class SubIObuffer - 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 SubIObuffer - the buffer to fillIOExceptionpublic AsyncSupplier<Integer,IOException> readFullyAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
IO.ReadablereadFullyAsync in interface IO.ReadablereadFullyAsync in class SubIObuffer - 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.ReadableIOExceptionpublic AsyncSupplier<Long,IOException> skipAsync(long n, Consumer<Pair<Long,IOException>> ondone)
IO.ReadableskipAsync in interface IO.ReadableCopyright © 2019. All rights reserved.