com.faunos.util.io
Class SourceChannelStack

java.lang.Object
  extended by com.faunos.util.io.SourceChannelStack
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel

public class SourceChannelStack
extends Object
implements ReadableByteChannel

Author:
Babak Farhang

Constructor Summary
SourceChannelStack(List<? extends ReadableByteChannel> sources)
           
 
Method Summary
 void close()
          Closes the underlying channels in the reverse order that they are read from.
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceChannelStack

public SourceChannelStack(List<? extends ReadableByteChannel> sources)
Method Detail

read

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

close

public void close()
           throws IOException
Closes the underlying channels in the reverse order that they are read from.

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