Package 

Interface WrappedByteChannel

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

    
    public interface WrappedByteChannel
     implements ByteChannel
                        
    • Method Summary

      Modifier and Type Method Description
      abstract boolean isNeedWrite() returns whether writeMore should be called write additional data.
      abstract void writeMore() Gets called when isNeedWrite ()} requires a additional rite
      abstract boolean isNeedRead() returns whether readMore should be called to fetch data which has been decoded but not yet beenreturned.
      abstract int readMore(ByteBuffer dst) This function does not read data from the underlying channel at all.
      abstract boolean isBlocking() This function returns the blocking state of the channel
      • Methods inherited from class java.nio.channels.ReadableByteChannel

        read
      • Methods inherited from class java.nio.channels.Channel

        close, isOpen
      • Methods inherited from class java.nio.channels.WritableByteChannel

        write
      • Methods inherited from class java.lang.Object

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

      • isNeedWrite

         abstract boolean isNeedWrite()

        returns whether writeMore should be called write additional data.

      • isNeedRead

         abstract boolean isNeedRead()

        returns whether readMore should be called to fetch data which has been decoded but not yet beenreturned.

      • readMore

         abstract int readMore(ByteBuffer dst)

        This function does not read data from the underlying channel at all. It is just a way to fetchdata which has already be received or decoded but was but was not yet returned to the user.This could be the case when the decoded data did not fit into the buffer the user passed to read.

        Parameters:
        dst - the destiny of the read
      • isBlocking

         abstract boolean isBlocking()

        This function returns the blocking state of the channel