public static class LinkedIO.Readable.Buffered extends LinkedIO.Readable implements IO.Readable.Buffered
| Modifier and Type | Class and Description |
|---|---|
static class |
LinkedIO.Readable.Buffered.DeterminedSize
Linked Readable Buffered IO and add the DeterminedSize capability.
|
LinkedIO.Readable.Buffered, LinkedIO.Readable.SeekableLinkedIO.ReadableIO.Readable.Buffered, IO.Readable.SeekableIO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Writable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.Impl| Constructor and Description |
|---|
Buffered(String description,
IO.Readable.Buffered... ios)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ISynchronizationPoint<IOException> |
canStartReading()
Return a synchronization point that is unblocked when data is ready to be read.
|
int |
read()
Read next byte.
|
int |
read(byte[] buf,
int off,
int len)
Read bytes into the given buffer, starting to store them at the given offset, and with the given maximum number of bytes.
|
int |
readAsync()
Read a single byte if possible.
|
int |
readFully(byte[] buffer)
Read bytes to fill the given buffer, and return the number of bytes read which is less than the
size of the buffer only if the end of the IO is reached, and so may return 0.
|
AsyncWork<ByteBuffer,IOException> |
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. |
int |
skip(int n)
Same as
IO.Readable.skipSync(long) but limited to an integer. |
nextIOAsync, nextIOSync, previousIOAsync, previousIOSync, readAsync, readFullyAsync, readFullySync, readSync, skipAsync, skipSynccanStartWriting, closeResources, closeUnderlyingResources, getPosition, getPriority, getSizeAsync, getSizeSync, getSourceDescription, getTaskManager, getWrappedIO, nextIOAsyncSeekable, nextIOAsyncStream, nextIOSyncSeekable, nextIOSyncStream, previousIOAsyncSeekable, previousIOAsyncStream, previousIOSyncSeekable, previousIOSyncStream, readAsync, readFullyAsync, readFullySync, readSync, seekAsync, seekSync, setPriorityaddCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadNextBufferAsyncreadAsync, readAsync, readFullyAsync, readFullyAsync, readFullySync, readSync, skipAsync, skipAsync, skipSyncreadByteerror, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerpublic Buffered(String description, IO.Readable.Buffered... ios)
public int read()
throws IOException
IO.ReadableByteStreamread in interface IO.ReadableByteStreamread in class LinkedIOIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
IO.ReadableByteStreamread in interface IO.ReadableByteStreamread in class LinkedIOIOExceptionpublic int readFully(byte[] buffer)
throws IOException
IO.ReadableByteStreamreadFully in interface IO.ReadableByteStreamreadFully in class LinkedIOIOExceptionpublic int readAsync()
throws IOException
IO.Readable.BufferedreadAsync in interface IO.Readable.BufferedreadAsync in class LinkedIOIOExceptionpublic int skip(int n)
throws IOException
IO.ReadableByteStreamIO.Readable.skipSync(long) but limited to an integer.skip in interface IO.ReadableByteStreamskip in class LinkedIOIOExceptionpublic ISynchronizationPoint<IOException> canStartReading()
IO.ReadablecanStartReading in interface IO.ReadablecanStartReading in interface IO.ReadableByteStreamcanStartReading in class LinkedIO.Readablepublic AsyncWork<ByteBuffer,IOException> readNextBufferAsync(RunnableWithParameter<Pair<ByteBuffer,IOException>> ondone)
IO.Readable.BufferedreadNextBufferAsync in interface IO.Readable.BufferedreadNextBufferAsync in class LinkedIOCopyright © 2018. All rights reserved.