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