public final class AsynchronousChannelHelper extends Object
AsynchronousByteChannel
or AsynchronousFileChannel
instances into AsyncInputStream
or AsyncOutputStream
instances.
Requires Java 7 or greater.
Modifier and Type | Method | 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 AsyncInputStream
asynchronousByteChannel
- the AsynchronousByteChannelpublic static AsyncInputStream channelToInputStream(AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel
into a AsyncInputStream
asynchronousFileChannel
- the AsynchronousFileChannelpublic static AsyncOutputStream channelToOutputStream(AsynchronousByteChannel asynchronousByteChannel)
AsynchronousByteChannel
into a AsyncOutputStream
asynchronousByteChannel
- the AsynchronousByteChannelpublic static AsyncOutputStream channelToOutputStream(AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel
into a AsyncOutputStream
asynchronousFileChannel
- the AsynchronousFileChannel