org.restlet.engine.io
Class ReadableSocketChannel
java.lang.Object
org.restlet.engine.io.WrapperChannel<SocketChannel>
org.restlet.engine.io.WrapperSocketChannel
org.restlet.engine.io.ReadableSocketChannel
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel, BlockableChannel, ReadableSelectionChannel, SelectionChannel
public class ReadableSocketChannel
- extends WrapperSocketChannel
- implements ReadableSelectionChannel
Readable byte channel based on a source socket channel that must only be
partially read.
Method Summary |
int |
read(ByteBuffer dst)
Reads the available byte form the wrapped socket channel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadableSocketChannel
public ReadableSocketChannel(SocketChannel wrappedChannel,
SelectionRegistration registration)
- Constructor.
- Parameters:
wrappedChannel
- The source channel.registration
- The NIO registration.
read
public int read(ByteBuffer dst)
throws IOException
- Reads the available byte form the wrapped socket channel.
- Specified by:
read
in interface ReadableByteChannel
- Parameters:
dst
- The destination byte buffer.
- Returns:
- The number of bytes read.
- Throws:
IOException
Copyright © 2005-2013 Restlet.