public final class AsynchronousChannelHelper
extends java.lang.Object
AsynchronousByteChannel
or AsynchronousFileChannel
instances into AsyncInputStream
or AsyncOutputStream
instances.
Requires Java 7 or greater.
Modifier | Constructor and Description |
---|---|
private |
AsynchronousChannelHelper() |
Modifier and Type | Method and Description |
---|---|
static AsyncInputStream |
channelToInputStream(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
Converts a
AsynchronousByteChannel into a AsyncInputStream |
static AsyncInputStream |
channelToInputStream(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
Converts a
AsynchronousFileChannel into a AsyncInputStream |
static AsyncOutputStream |
channelToOutputStream(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
Converts a
AsynchronousByteChannel into a AsyncOutputStream |
static AsyncOutputStream |
channelToOutputStream(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
Converts a
AsynchronousFileChannel into a AsyncOutputStream |
public static AsyncInputStream channelToInputStream(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
AsynchronousByteChannel
into a AsyncInputStream
asynchronousByteChannel
- the AsynchronousByteChannelpublic static AsyncInputStream channelToInputStream(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel
into a AsyncInputStream
asynchronousFileChannel
- the AsynchronousFileChannelpublic static AsyncOutputStream channelToOutputStream(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
AsynchronousByteChannel
into a AsyncOutputStream
asynchronousByteChannel
- the AsynchronousByteChannelpublic static AsyncOutputStream channelToOutputStream(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
AsynchronousFileChannel
into a AsyncOutputStream
asynchronousFileChannel
- the AsynchronousFileChannel