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