org.freecompany.redline
Class WritableChannelWrapper

java.lang.Object
  extended by org.freecompany.redline.ChannelWrapper
      extended by org.freecompany.redline.WritableChannelWrapper
All Implemented Interfaces:
java.io.Closeable, java.nio.channels.Channel, java.nio.channels.WritableByteChannel

public class WritableChannelWrapper
extends ChannelWrapper
implements java.nio.channels.WritableByteChannel


Nested Class Summary
 
Nested classes/interfaces inherited from class org.freecompany.redline.ChannelWrapper
ChannelWrapper.Consumer<T>, ChannelWrapper.Key<T>
 
Field Summary
protected  java.nio.channels.WritableByteChannel channel
           
 
Fields inherited from class org.freecompany.redline.ChannelWrapper
consumers
 
Constructor Summary
WritableChannelWrapper(java.nio.channels.WritableByteChannel channel)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int write(java.nio.ByteBuffer buffer)
           
 
Methods inherited from class org.freecompany.redline.ChannelWrapper
finish, start, start, start, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channel

protected java.nio.channels.WritableByteChannel channel
Constructor Detail

WritableChannelWrapper

public WritableChannelWrapper(java.nio.channels.WritableByteChannel channel)
Method Detail

write

public int write(java.nio.ByteBuffer buffer)
          throws java.io.IOException
Specified by:
write in interface java.nio.channels.WritableByteChannel
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface java.nio.channels.Channel
Overrides:
close in class ChannelWrapper
Throws:
java.io.IOException

isOpen

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