org.restlet.engine.io
Class WritableSocketChannel

java.lang.Object
  extended by org.restlet.engine.io.WrapperChannel<SocketChannel>
      extended by org.restlet.engine.io.WrapperSocketChannel
          extended by 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.


Constructor Summary
WritableSocketChannel(SocketChannel wrappedChannel, SelectionRegistration registration)
          Constructor.
 
Method Summary
 int write(ByteBuffer src)
          Writes the given bytes to the wrapped socket channel.
 
Methods inherited from class org.restlet.engine.io.WrapperSocketChannel
getRegistration, isBlocking
 
Methods inherited from class org.restlet.engine.io.WrapperChannel
close, getWrappedChannel, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.restlet.engine.io.SelectionChannel
getRegistration
 
Methods inherited from interface org.restlet.engine.io.BlockableChannel
isBlocking
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Constructor Detail

WritableSocketChannel

public WritableSocketChannel(SocketChannel wrappedChannel,
                             SelectionRegistration registration)
Constructor.

Parameters:
wrappedChannel - The source channel.
registration - The NIO registration.
Method Detail

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.