public final class AsynchronousChannelHelper extends Object
AsynchronousByteChannel or AsynchronousFileChannel instances into AsyncInputStream
or AsyncOutputStream instances.
Requires Java 7 or greater.
| Modifier and Type | Method and Description |
|---|---|
static AsyncInputStream |
channelToInputStream(AsynchronousByteChannel asynchronousByteChannel)
Converts a
AsynchronousByteChannel into a AsyncInputStream |
static AsyncInputStream |
channelToInputStream(AsynchronousFileChannel asynchronousFileChannel)
Converts a
AsynchronousFileChannel into a AsyncInputStream |
static AsyncOutputStream |
channelToOutputStream(AsynchronousByteChannel asynchronousByteChannel)
Converts a
AsynchronousByteChannel into a AsyncOutputStream |
static AsyncOutputStream |
channelToOutputStream(AsynchronousFileChannel asynchronousFileChannel)
Converts a
AsynchronousFileChannel into a AsyncOutputStream |
public static AsyncInputStream channelToInputStream(AsynchronousByteChannel asynchronousByteChannel)
AsynchronousByteChannel into a AsyncInputStreamasynchronousByteChannel - the AsynchronousByteChannelpublic static AsyncInputStream channelToInputStream(AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel into a AsyncInputStreamasynchronousFileChannel - the AsynchronousFileChannelpublic static AsyncOutputStream channelToOutputStream(AsynchronousByteChannel asynchronousByteChannel)
AsynchronousByteChannel into a AsyncOutputStreamasynchronousByteChannel - the AsynchronousByteChannelpublic static AsyncOutputStream channelToOutputStream(AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel into a AsyncOutputStreamasynchronousFileChannel - the AsynchronousFileChannel