Class AsynchronousChannelHelper


  • Deprecated. 
    Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)

    @Deprecated
    public final class AsynchronousChannelHelper
    extends java.lang.Object
    A helper class to convert to AsynchronousByteChannel or AsynchronousFileChannel instances into AsyncInputStream or AsyncOutputStream instances.

    Requires Java 7 or greater.

    Since:
    3.3
    • Method Detail

      • channelToInputStream

        public static AsyncInputStream channelToInputStream​(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
        Deprecated. 
        Converts a AsynchronousByteChannel into a AsyncInputStream
        Parameters:
        asynchronousByteChannel - the AsynchronousByteChannel
        Returns:
        the AsyncInputStream
      • channelToInputStream

        public static AsyncInputStream channelToInputStream​(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
        Deprecated. 
        Converts a AsynchronousFileChannel into a AsyncInputStream
        Parameters:
        asynchronousFileChannel - the AsynchronousFileChannel
        Returns:
        the AsyncInputStream
      • channelToOutputStream

        public static AsyncOutputStream channelToOutputStream​(java.nio.channels.AsynchronousByteChannel asynchronousByteChannel)
        Deprecated. 
        Converts a AsynchronousByteChannel into a AsyncOutputStream
        Parameters:
        asynchronousByteChannel - the AsynchronousByteChannel
        Returns:
        the AsyncOutputStream
      • channelToOutputStream

        public static AsyncOutputStream channelToOutputStream​(java.nio.channels.AsynchronousFileChannel asynchronousFileChannel)
        Deprecated. 
        Converts a AsynchronousFileChannel into a AsyncOutputStream
        Parameters:
        asynchronousFileChannel - the AsynchronousFileChannel
        Returns:
        the AsyncOutputStream