Class AsyncChannelWrapper

  • All Implemented Interfaces:
    AsyncChannel, java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.AsynchronousChannel, java.nio.channels.Channel

    public final class AsyncChannelWrapper
    extends java.lang.Object
    implements AsyncChannel
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncChannelWrapper​(java.nio.channels.AsynchronousChannel channel)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean isFileChannel()  
      boolean isOpen()  
      <A> void read​(java.nio.ByteBuffer dst, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,​? super A> handler)  
      java.nio.channels.AsynchronousChannel wrapped()  
      <A> void write​(java.nio.ByteBuffer src, long position, A attach, java.nio.channels.CompletionHandler<java.lang.Integer,​? super A> handler)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsyncChannelWrapper

        public AsyncChannelWrapper​(java.nio.channels.AsynchronousChannel channel)
    • Method Detail

      • wrapped

        public final java.nio.channels.AsynchronousChannel wrapped()
        Specified by:
        wrapped in interface AsyncChannel
      • read

        public final <A> void read​(java.nio.ByteBuffer dst,
                                   long position,
                                   A attach,
                                   java.nio.channels.CompletionHandler<java.lang.Integer,​? super A> handler)
        Specified by:
        read in interface AsyncChannel
      • write

        public final <A> void write​(java.nio.ByteBuffer src,
                                    long position,
                                    A attach,
                                    java.nio.channels.CompletionHandler<java.lang.Integer,​? super A> handler)
        Specified by:
        write in interface AsyncChannel
      • isOpen

        public final boolean isOpen()
        Specified by:
        isOpen in interface java.nio.channels.Channel
      • close

        public final void close()
                         throws java.io.IOException
        Specified by:
        close in interface java.nio.channels.AsynchronousChannel
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException