public static interface IO.Readable extends IO
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IO.Readable.Buffered
Indicates the IO is buffered, and add operations.
|
static interface |
IO.Readable.Seekable
Add read operations to read at a specific position.
|
IO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.Impl| Modifier and Type | Method and Description |
|---|---|
IAsync<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
default AsyncSupplier<Integer,IOException> |
readAsync(ByteBuffer buffer)
Equivalent to readAsync(buffer, null).
|
AsyncSupplier<Integer,IOException> |
readAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Asynchronous read operation.
|
default AsyncSupplier<Integer,IOException> |
readFullyAsync(ByteBuffer buffer)
Equivalent to readFullyAsync(buffer, null).
|
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.
|
default AsyncSupplier<Long,IOException> |
skipAsync(long n)
Returns the number of bytes skipped.
|
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.
|
cancelClosed, error, errorCancelled, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerIAsync<IOException> canStartReading()
int readSync(ByteBuffer buffer) throws IOException
buffer - buffer to fillIOExceptionAsyncSupplier<Integer,IOException> readAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
buffer - buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.default AsyncSupplier<Integer,IOException> readAsync(ByteBuffer buffer)
int readFullySync(ByteBuffer buffer) throws IOException
buffer - the buffer to fillIOExceptionAsyncSupplier<Integer,IOException> readFullyAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
buffer - the buffer to fillondone - called before the returned AsyncWork is unblocked and its listeners are called.default AsyncSupplier<Integer,IOException> readFullyAsync(ByteBuffer buffer)
long skipSync(long n)
throws IOException
IOExceptionAsyncSupplier<Long,IOException> skipAsync(long n, Consumer<Pair<Long,IOException>> ondone)
default AsyncSupplier<Long,IOException> skipAsync(long n)
Copyright © 2019. All rights reserved.