public abstract class SubIO extends ConcurrentCloseable<IOException> implements IO, IO.KnownSize, IO.PositionKnown
| Modifier and Type | Class and Description |
|---|---|
static class |
SubIO.Readable
Sub-part of a Readable IO.
|
static class |
SubIO.ReadWrite
Sub-part of a Seekable Readable and Writable IO.
|
static class |
SubIO.Writable
Sub-part of a Writable IO.
|
IO.KnownSize, IO.OperationType, IO.OutputToInput, IO.PositionKnown, IO.ReadableByteStream, IO.Resizable, IO.Seekable, IO.WritableByteStream, IO.WriterAsyncCloseableListenable.Impl| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closeContainer |
protected String |
description |
protected IO |
io |
protected long |
pos |
protected long |
size |
protected long |
start |
| Modifier and Type | Method and Description |
|---|---|
protected IAsync<IOException> |
canStartReading() |
protected IAsync<IOException> |
canStartWriting() |
protected void |
closeResources(Async<IOException> ondone) |
protected IAsync<IOException> |
closeUnderlyingResources() |
long |
getPosition()
Return the current position.
|
byte |
getPriority()
Return the priority.
|
AsyncSupplier<Long,IOException> |
getSizeAsync()
Asynchronous operation to get the size of the IO.
|
long |
getSizeSync()
Synchronous operation to get the size of the IO.
|
String |
getSourceDescription()
Describe the IO, which can be used for logging or debugging purposes.
|
TaskManager |
getTaskManager()
Return the TaskManager used for asynchronous operations.
|
IO |
getWrappedIO()
If this IO is wrapping another one (such as adding Buffered capabilities), this method returns it,
or null if it does not wrap another IO.
|
protected AsyncSupplier<Integer,IOException> |
readAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected AsyncSupplier<Integer,IOException> |
readAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected AsyncSupplier<Integer,IOException> |
readFullyAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected AsyncSupplier<Integer,IOException> |
readFullyAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected int |
readFullySync(ByteBuffer buffer) |
protected int |
readFullySync(long pos,
ByteBuffer buffer) |
protected int |
readSync(ByteBuffer buffer) |
protected int |
readSync(long pos,
ByteBuffer buffer) |
protected AsyncSupplier<Long,IOException> |
seekAsync(IO.Seekable.SeekType type,
long move,
Consumer<Pair<Long,IOException>> ondone) |
protected long |
seekSync(IO.Seekable.SeekType type,
long move) |
void |
setPriority(byte priority)
Set the priority of asynchronous operations.
|
protected AsyncSupplier<Integer,IOException> |
writeAsync(ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected AsyncSupplier<Integer,IOException> |
writeAsync(long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone) |
protected int |
writeSync(ByteBuffer buffer) |
protected int |
writeSync(long pos,
ByteBuffer buffer) |
addCloseListener, addCloseListener, close, closeAsync, isClosed, isClosing, lockClose, operation, operation, removeCloseListener, removeCloseListener, unlockCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelClosed, error, errorCancelledlockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerprotected IO io
protected long pos
protected long start
protected long size
protected String description
protected boolean closeContainer
public IO getWrappedIO()
IOgetWrappedIO in interface IOpublic String getSourceDescription()
IOgetSourceDescription in interface IOpublic TaskManager getTaskManager()
IOgetTaskManager in interface IOpublic byte getPriority()
ConcurrentCloseablegetPriority in interface IOgetPriority in class ConcurrentCloseable<IOException>public void setPriority(byte priority)
IOsetPriority in interface IOprotected IAsync<IOException> closeUnderlyingResources()
closeUnderlyingResources in class ConcurrentCloseable<IOException>protected void closeResources(Async<IOException> ondone)
closeResources in class ConcurrentCloseable<IOException>public long getSizeSync()
IO.KnownSizegetSizeSync in interface IO.KnownSizepublic AsyncSupplier<Long,IOException> getSizeAsync()
IO.KnownSizegetSizeAsync in interface IO.KnownSizepublic long getPosition()
IO.PositionKnowngetPosition in interface IO.PositionKnownprotected IAsync<IOException> canStartReading()
protected int readSync(ByteBuffer buffer) throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> readAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
protected int readFullySync(ByteBuffer buffer) throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> readFullyAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
protected int readSync(long pos,
ByteBuffer buffer)
throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> readAsync(long pos, ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
protected int readFullySync(long pos,
ByteBuffer buffer)
throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> readFullyAsync(long pos, ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
protected long seekSync(IO.Seekable.SeekType type, long move)
protected AsyncSupplier<Long,IOException> seekAsync(IO.Seekable.SeekType type, long move, Consumer<Pair<Long,IOException>> ondone)
protected IAsync<IOException> canStartWriting()
protected int writeSync(ByteBuffer buffer) throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> writeAsync(ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
protected int writeSync(long pos,
ByteBuffer buffer)
throws IOException
IOExceptionprotected AsyncSupplier<Integer,IOException> writeAsync(long pos, ByteBuffer buffer, Consumer<Pair<Integer,IOException>> ondone)
Copyright © 2019. All rights reserved.