Class AbstractNoninterruptibleReadableChannel

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

    abstract class AbstractNoninterruptibleReadableChannel
    extends java.lang.Object
    implements java.nio.channels.ReadableByteChannel
    The channel used for reads which cannot be implicitly closed after the operational Thread is interrupted.
    Since:
    3.0.0-M5
    • Field Detail

      • open

        private volatile boolean open
    • Constructor Detail

      • AbstractNoninterruptibleReadableChannel

        AbstractNoninterruptibleReadableChannel()
    • Method Detail

      • readImpl

        protected abstract int readImpl​(java.nio.ByteBuffer src)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • closeImpl

        protected abstract void closeImpl()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public final int read​(java.nio.ByteBuffer src)
                       throws java.io.IOException
        Specified by:
        read in interface java.nio.channels.ReadableByteChannel
        Throws:
        java.io.IOException
      • 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.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException