Class ReadableSocketChannel

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

    @Deprecated
    public class ReadableSocketChannel
    extends WrapperSocketChannel
    implements ReadableSelectionChannel
    Deprecated.
    Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.
    Readable byte channel based on a source socket channel that must only be partially read.
    • Constructor Detail

      • ReadableSocketChannel

        public ReadableSocketChannel​(java.nio.channels.SocketChannel wrappedChannel,
                                     SelectionRegistration registration)
        Deprecated.
        Constructor.
        Parameters:
        wrappedChannel - The source channel.
        registration - The NIO registration.
    • Method Detail

      • read

        public int read​(java.nio.ByteBuffer dst)
                 throws java.io.IOException
        Deprecated.
        Reads the available byte form the wrapped socket channel.
        Specified by:
        read in interface java.nio.channels.ReadableByteChannel
        Parameters:
        dst - The destination byte buffer.
        Returns:
        The number of bytes read.
        Throws:
        java.io.IOException