org.freecompany.redline
Class ReadableChannelWrapper

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

public class ReadableChannelWrapper
extends ChannelWrapper
implements java.nio.channels.ReadableByteChannel


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.ReadableByteChannel channel
           
 
Fields inherited from class org.freecompany.redline.ChannelWrapper
consumers
 
Constructor Summary
ReadableChannelWrapper(java.nio.channels.ReadableByteChannel channel)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int read(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.ReadableByteChannel channel
Constructor Detail

ReadableChannelWrapper

public ReadableChannelWrapper(java.nio.channels.ReadableByteChannel channel)
Method Detail

read

public int read(java.nio.ByteBuffer buffer)
         throws java.io.IOException
Specified by:
read in interface java.nio.channels.ReadableByteChannel
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