public static interface IO.ReadableByteStream extends IO
IO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.Readable, IO.ReadableByteStream, IO.Resizable, IO.Seekable, 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.
|
int |
read()
Read next byte.
|
int |
read(byte[] buffer,
int offset,
int len)
Read bytes into the given buffer, starting to store them at the given offset, and with the given maximum number of bytes.
|
default byte |
readByte()
Similar to read, but returns a byte and throw an EOFException in case the end is reached.
|
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.
|
int |
skip(int skip)
Same as
IO.Readable.skipSync(long) but limited to an integer. |
cancelClosed, error, errorCancelled, getPriority, getSourceDescription, getTaskManager, getWrappedIO, setPrioritylockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerIAsync<IOException> canStartReading()
int read() throws IOException
IOExceptionint read(byte[] buffer,
int offset,
int len)
throws IOException
IOExceptionint readFully(byte[] buffer)
throws IOException
IOExceptiondefault byte readByte()
throws IOException
IOExceptionint skip(int skip) throws IOException
IO.Readable.skipSync(long) but limited to an integer.IOExceptionCopyright © 2019. All rights reserved.