com.faunos.util.io
Class FilterInputChannel

java.lang.Object
  extended by com.faunos.util.io.FilterInputChannel
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel, ScatteringByteChannel
Direct Known Subclasses:
DebugInputChannel

public class FilterInputChannel
extends Object
implements ScatteringByteChannel

A filter (or facade) on a ScatteringByteChannel.

Author:
Babak Farhang

Field Summary
protected  ScatteringByteChannel inner
          The instance delegated to.
 
Constructor Summary
protected FilterInputChannel()
          Default constructor exposed to subclasses.
  FilterInputChannel(ScatteringByteChannel inner)
          Creates a new instance with the underlying inner instance.
 
Method Summary
 void close()
           
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 long read(ByteBuffer[] dsts)
          Invokes read(dsts, 0, dsts.length).
 long read(ByteBuffer[] dsts, int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inner

protected ScatteringByteChannel inner
The instance delegated to. Must not be null after construction.

Constructor Detail

FilterInputChannel

protected FilterInputChannel()
Default constructor exposed to subclasses.

See Also:
inner

FilterInputChannel

public FilterInputChannel(ScatteringByteChannel inner)
Creates a new instance with the underlying inner instance.

Method Detail

read

public long read(ByteBuffer[] dsts)
          throws IOException
Invokes read(dsts, 0, dsts.length).

Specified by:
read in interface ScatteringByteChannel
Throws:
IOException

read

public long read(ByteBuffer[] dsts,
                 int offset,
                 int length)
          throws IOException
Specified by:
read in interface ScatteringByteChannel
Throws:
IOException

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel


SourceForge.net Logo