public static class LinkedIO.ReadWrite extends LinkedIO.Readable.Seekable implements IO.Writable.Seekable
LinkedIO.Readable.Seekable.Buffered, LinkedIO.Readable.Seekable.DeterminedSizeLinkedIO.Readable.SeekableLinkedIO.Readable, LinkedIO.ReadWriteIO.Writable.Buffered, IO.Writable.SeekableIO.Seekable.SeekTypeIO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.ImplIO.Readable.Seekable| Constructor and Description |
|---|
ReadWrite(String description,
T... ios)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IAsync<IOException> |
canStartWriting()
Return a synchronization point that is unblocked when data is ready to be written.
|
AsyncSupplier<Integer,IOException> |
writeAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Write asynchronously all bytes available in the given buffer at the current position.
|
AsyncSupplier<Integer,IOException> |
writeAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Same as
IO.Writable.writeAsync(ByteBuffer, Consumer) but at the given position. |
int |
writeSync(ByteBuffer buffer)
Write synchronously all bytes available in the given buffer at the current position.
|
int |
writeSync(long pos,
ByteBuffer buffer)
Same as
IO.Writable.writeSync(ByteBuffer) but at the given position. |
getPosition, nextIOAsync, nextIOSync, previousIOAsync, previousIOSync, readAsync, readFullyAsync, readFullySync, readSync, seekAsync, seekSynccanStartReading, readAsync, readFullyAsync, readFullySync, readSync, skipAsync, skipSynccloseResources, closeUnderlyingResources, getPriority, getSizeAsync, getSizeSync, getSourceDescription, getTaskManager, getWrappedIO, nextIOAsyncSeekable, nextIOAsyncStream, nextIOSyncSeekable, nextIOSyncStream, previousIOAsyncSeekable, previousIOAsyncStream, previousIOSyncSeekable, previousIOSyncStream, read, read, readAsync, readFully, readFullySyncIfPossible, readNextBuffer, readNextBufferAsync, setPriority, skipaddCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteAsyncwriteAsyncseekAsync, seekAsync, seekSyncgetPositioncancelClosed, error, errorCancelled, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerreadAsync, readFullyAsynccanStartReading, readAsync, readAsync, readFullyAsync, readFullyAsync, readFullySync, readSync, skipAsync, skipAsync, skipSync@SafeVarargs public ReadWrite(String description, T... ios)
public IAsync<IOException> canStartWriting()
IO.WritablecanStartWriting in interface IO.WritablecanStartWriting in class LinkedIOpublic int writeSync(long pos,
ByteBuffer buffer)
throws IOException
IO.Writable.SeekableIO.Writable.writeSync(ByteBuffer) but at the given position.
Note that if the IO implements Resizable, the behaviour is different when writing at
the end or beyond the end of the IO: if not resizable, it must throw an exception,
while a resizable IO should accept it except if the resize operation fails.writeSync in interface IO.Writable.SeekablewriteSync in class LinkedIOIOExceptionpublic int writeSync(ByteBuffer buffer) throws IOException
IO.WritablewriteSync in interface IO.WritablewriteSync in class LinkedIOIOExceptionpublic AsyncSupplier<Integer,IOException> writeAsync(long pos, ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
IO.Writable.SeekableIO.Writable.writeAsync(ByteBuffer, Consumer) but at the given position.
Note that if the IO implements Resizable, the behaviour is different when writing at
the end or beyond the end of the IO: if not resizable, it must throw an exception,
while a resizable IO should accept it except if the resize operation fails.writeAsync in interface IO.Writable.SeekablewriteAsync in class LinkedIOpublic AsyncSupplier<Integer,IOException> writeAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
IO.WritablewriteAsync in interface IO.WritablewriteAsync in class LinkedIOCopyright © 2019. All rights reserved.