static <T> void |
IOUtil.listenOnDone(AsyncWork<T,IOException> toListen,
AsyncWork<T,IOException> toUnblock,
RunnableWithParameter<Pair<T,IOException>> ondone)
Listen to the given asynchronous operation, then unblock toUnblock with its result/error/cancellation,
but calls ondone before if not null and the result is not cancelled.
|
static <T,T2> void |
IOUtil.listenOnDone(AsyncWork<T,IOException> toListen,
Listener<T> onReady,
ISynchronizationPoint<IOException> onErrorOrCancel,
RunnableWithParameter<Pair<T2,IOException>> ondone)
Listen to toListen, then calls onReady if it succeed.
|
protected abstract void |
LinkedIO.nextIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.Readable.nextIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.Readable.Seekable.nextIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.nextIOAsyncSeekable(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected abstract void |
LinkedIO.previousIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.Readable.previousIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.Readable.Seekable.previousIOAsync(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
protected void |
LinkedIO.previousIOAsyncSeekable(Runnable ondone,
ISynchronizationPoint<IOException> onerror,
RunnableWithParameter rp) |
AsyncWork<Integer,IOException> |
SubIO.Readable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
SubIO.Readable.Seekable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
PositionKnownWrapper.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
PositionKnownWrapper.Readable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
PositionKnownWrapper.Readable.Buffered.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
LinkedIO.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
LinkedIO.Readable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IOFromInputStream.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Readable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Asynchronous read operation.
|
AsyncWork<Integer,IOException> |
FragmentedSubIO.Readable.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
FileIO.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadOnly.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.readAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
SubIO.Readable.Seekable.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
LinkedIO.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
LinkedIO.Readable.Seekable.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Readable.Seekable.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
|
protected AsyncWork<Integer,IOException> |
FragmentedSubIO.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FragmentedSubIO.Readable.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
FileIO.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadOnly.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.readAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
static Task<Integer,IOException> |
IOUtil.readAsyncUsingSync(IO.Readable.Seekable io,
long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Integer,IOException> |
IOUtil.readAsyncUsingSync(IO.Readable io,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
AsyncWork<Integer,IOException> |
SubIO.Readable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
SubIO.Readable.Seekable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
PositionKnownWrapper.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
PositionKnownWrapper.Readable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
PositionKnownWrapper.Readable.Buffered.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
LinkedIO.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
LinkedIO.Readable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IOFromInputStream.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Readable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Asynchronous read operation to fully fill the given buffer.
|
AsyncWork<Integer,IOException> |
FragmentedSubIO.Readable.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
FileIO.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadOnly.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.readFullyAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
static AsyncWork<Integer,IOException> |
IOUtil.readFullyAsync(IO.Readable.Seekable io,
long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Fill the remaining bytes of the given buffer.
|
static AsyncWork<Integer,IOException> |
IOUtil.readFullyAsync(IO.Readable io,
ByteBuffer buffer,
int done,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Fill the remaining bytes of the given buffer asynchronously.
|
static AsyncWork<Integer,IOException> |
IOUtil.readFullyAsync(IO.Readable io,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Fill the remaining bytes of the given buffer asynchronously.
|
AsyncWork<Integer,IOException> |
SubIO.Readable.Seekable.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
LinkedIO.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
LinkedIO.Readable.Seekable.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Readable.Seekable.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
|
AsyncWork<Integer,IOException> |
FragmentedSubIO.Readable.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
protected AsyncWork<Integer,IOException> |
FileIO.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadOnly.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.readFullyAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
static Task<Integer,IOException> |
IOUtil.readFullyAsyncUsingSync(IO.Readable.Seekable io,
long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
static Task<Integer,IOException> |
IOUtil.readFullyAsyncUsingSync(IO.Readable io,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous read using a task calling the synchronous one.
|
AsyncWork<ByteBuffer,IOException> |
SubIO.Readable.Seekable.Buffered.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
protected AsyncWork<ByteBuffer,IOException> |
PositionKnownWrapper.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
AsyncWork<ByteBuffer,IOException> |
PositionKnownWrapper.Readable.Buffered.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
protected AsyncWork<ByteBuffer,IOException> |
LinkedIO.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
AsyncWork<ByteBuffer,IOException> |
LinkedIO.Readable.Buffered.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
AsyncWork<ByteBuffer,IOException> |
LinkedIO.Readable.Seekable.Buffered.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone) |
AsyncWork<ByteBuffer,IOException> |
IO.Readable.Buffered.readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone)
Retrieve a buffer of bytes in the most efficient way depending on the implementation of Buffered.
This method is similar to readAsync, it read some bytes that are immediately available with a minimum of
operations.
|
AsyncWork<Long,IOException> |
SubIO.Readable.Seekable.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
protected AsyncWork<Long,IOException> |
LinkedIO.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
LinkedIO.Readable.Seekable.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
IO.Seekable.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Returns the new position.
|
AsyncWork<Long,IOException> |
FragmentedSubIO.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
protected AsyncWork<Long,IOException> |
FileIO.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FileIO.ReadOnly.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FileIO.WriteOnly.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FileIO.ReadWrite.seekAsync(IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
static Task<Long,IOException> |
IOUtil.seekAsyncUsingSync(IO.Readable.Seekable io,
IO.Seekable.SeekType type,
long move,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Implement an asynchronous seek using a task calling a synchronous one.
|
AsyncWork<Long,IOException> |
SubIO.Readable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
SubIO.Readable.Seekable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
protected AsyncWork<Long,IOException> |
PositionKnownWrapper.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
PositionKnownWrapper.Readable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
PositionKnownWrapper.Readable.Buffered.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
protected AsyncWork<Long,IOException> |
LinkedIO.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
LinkedIO.Readable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
IOFromInputStream.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
IO.Readable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Returns the number of bytes skipped.
|
protected AsyncWork<Long,IOException> |
FragmentedSubIO.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FragmentedSubIO.Readable.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
protected AsyncWork<Long,IOException> |
FileIO.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FileIO.ReadOnly.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
AsyncWork<Long,IOException> |
FileIO.ReadWrite.skipAsync(long n,
RunnableWithParameter<Pair<Long,IOException>> ondone) |
static AsyncWork<Long,IOException> |
IOUtil.skipAsyncByReading(IO.Readable io,
long n,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Implement an asynchronous skip using readAsync.
|
static AsyncWork<Long,IOException> |
IOUtil.skipAsyncUsingSync(IO.Readable io,
long n,
RunnableWithParameter<Pair<Long,IOException>> ondone)
Implement an asynchronous skip using a task calling a synchronous skip.
|
AsyncWork<Integer,IOException> |
IOFromOutputStream.writeAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Writable.writeAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Write asynchronously all bytes available in the given buffer at the current position.
|
protected AsyncWork<Integer,IOException> |
FileIO.writeAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.WriteOnly.writeAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.writeAsync(ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
IO.Writable.Seekable.writeAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
|
protected AsyncWork<Integer,IOException> |
FileIO.writeAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.WriteOnly.writeAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
AsyncWork<Integer,IOException> |
FileIO.ReadWrite.writeAsync(long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone) |
static Task<Integer,IOException> |
IOUtil.writeAsyncUsingSync(IO.Writable.Seekable io,
long pos,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous write using a task calling a synchronous write.
|
static Task<Integer,IOException> |
IOUtil.writeAsyncUsingSync(IO.Writable io,
ByteBuffer buffer,
RunnableWithParameter<Pair<Integer,IOException>> ondone)
Implement an asynchronous write using a task calling a synchronous write.
|