Class AbstractNoninterruptibleWritableChannel

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

    abstract class AbstractNoninterruptibleWritableChannel
    extends java.lang.Object
    implements WritableBufferedByteChannel
    The channel used for writes 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

      • AbstractNoninterruptibleWritableChannel

        AbstractNoninterruptibleWritableChannel()
    • Method Detail

      • writeImpl

        protected abstract void writeImpl​(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
      • flushImpl

        protected abstract void flushImpl()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public final int write​(java.nio.ByteBuffer src)
                        throws java.io.IOException
        Specified by:
        write in interface java.nio.channels.WritableByteChannel
        Throws:
        java.io.IOException
      • writeBuffered

        public final void writeBuffered​(java.nio.ByteBuffer src)
                                 throws java.io.IOException
        Specified by:
        writeBuffered in interface WritableBufferedByteChannel
        Throws:
        java.io.IOException
      • write

        int write​(java.nio.ByteBuffer src,
                  boolean flush)
           throws java.io.IOException
        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