public interface IO extends IConcurrentCloseable<IOException>
net.lecousin.framework.io.| Modifier and Type | Interface and Description |
|---|---|
static interface |
IO.KnownSize
Add capability to know the size of an IO.
|
static class |
IO.OperationType
Synchronous ou asynchronous operation.
|
static interface |
IO.OutputToInput
An OutputToInput is an IO on which a producer is writing, and a consumer is reading.
The producer receive it as a Writable, and the consumer as a Readable. Both can work concurrently: as soon as data is written by the producer, it can be read by the consumer. The producer must call the method endOfData or signalErrorBeforeEndOfData, so the consumer can receive the information it reaches the end of the IO. The implementations may add additional capabilities such as Readable.Seekable if it keeps the data. |
static interface |
IO.PositionKnown
Capability to get the current position on an IO.
|
static interface |
IO.Readable
Add the capability to read forward on an IO.
|
static interface |
IO.ReadableByteStream
Add capability to read byte by byte, typically a buffered IO.
|
static interface |
IO.Resizable
Add capability to resize the IO.
|
static interface |
IO.Seekable
Capability to set the position on an IO.
|
static interface |
IO.Writable
Add the capability to write forward on an IO.
|
static interface |
IO.WritableByteStream
Add capability to write byte by byte.
|
static interface |
IO.WriterAsync
Simple interface for something to which we can write buffers asynchronously.
|
CloseableListenable.Impl| Modifier and Type | Method and Description |
|---|---|
static CancelException |
cancelClosed()
Return a CancelException with message IO closed.
|
static IOException |
error(Throwable e)
Convert an Exception into an IOException.
|
static IOException |
errorCancelled(CancelException e)
Create an IOException from a CancelException.
|
byte |
getPriority()
Return the priority of asynchronous operations.
|
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.
|
void |
setPriority(byte priority)
Set the priority of asynchronous operations.
|
lockClose, unlockCloseclosecloseAfter, closeAsyncaddCloseListener, addCloseListener, close, isClosed, removeCloseListener, removeCloseListenerString getSourceDescription()
IO getWrappedIO()
byte getPriority()
void setPriority(byte priority)
TaskManager getTaskManager()
static IOException error(Throwable e)
static IOException errorCancelled(CancelException e)
static CancelException cancelClosed()
Copyright © 2019. All rights reserved.