Class AbstractWrappedByteChannel

  • 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, WrappedByteChannel

    @Deprecated
    public class AbstractWrappedByteChannel
    extends java.lang.Object
    implements WrappedByteChannel
    Deprecated.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.channels.ByteChannel channel
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
       
      boolean isBlocking()
      Deprecated.
      This function returns the blocking state of the channel
      boolean isNeedRead()
      Deprecated.
      returns whether readMore should be called to fetch data which has been decoded but not yet been returned.
      boolean isNeedWrite()
      Deprecated.
      returns whether writeMore should be called write additional data.
      boolean isOpen()
      Deprecated.
       
      int read​(java.nio.ByteBuffer dst)
      Deprecated.
       
      int readMore​(java.nio.ByteBuffer dst)
      Deprecated.
      This function does not read data from the underlying channel at all.
      int write​(java.nio.ByteBuffer src)
      Deprecated.
       
      void writeMore()
      Deprecated.
      Gets called when WrappedByteChannel.isNeedWrite() ()} requires a additional rite
      • Methods inherited from class java.lang.Object

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

      • channel

        private final java.nio.channels.ByteChannel channel
        Deprecated.
    • Constructor Detail

      • AbstractWrappedByteChannel

        @Deprecated
        public AbstractWrappedByteChannel​(java.nio.channels.ByteChannel towrap)
        Deprecated.
      • AbstractWrappedByteChannel

        @Deprecated
        public AbstractWrappedByteChannel​(WrappedByteChannel towrap)
        Deprecated.
    • Method Detail

      • read

        public int read​(java.nio.ByteBuffer dst)
                 throws java.io.IOException
        Deprecated.
        Specified by:
        read in interface java.nio.channels.ReadableByteChannel
        Throws:
        java.io.IOException
      • isOpen

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

        public void close()
                   throws java.io.IOException
        Deprecated.
        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
      • write

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

        public boolean isNeedWrite()
        Deprecated.
        Description copied from interface: WrappedByteChannel
        returns whether writeMore should be called write additional data.
        Specified by:
        isNeedWrite in interface WrappedByteChannel
        Returns:
        is a additional write needed
      • readMore

        public int readMore​(java.nio.ByteBuffer dst)
                     throws java.io.IOException
        Deprecated.
        Description copied from interface: WrappedByteChannel
        This function does not read data from the underlying channel at all. It is just a way to fetch data 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 ReadableByteChannel.read(ByteBuffer).
        Specified by:
        readMore in interface WrappedByteChannel
        Parameters:
        dst - the destiny of the read
        Returns:
        the amount of remaining data
        Throws:
        java.io.IOException - when a error occurred during unwrapping
      • isBlocking

        public boolean isBlocking()
        Deprecated.
        Description copied from interface: WrappedByteChannel
        This function returns the blocking state of the channel
        Specified by:
        isBlocking in interface WrappedByteChannel
        Returns:
        is the channel blocking