com.faunos.util.io
Class SourceChannelStack
java.lang.Object
com.faunos.util.io.SourceChannelStack
- All Implemented Interfaces:
- Closeable, Channel, ReadableByteChannel
public class SourceChannelStack
- extends Object
- implements ReadableByteChannel
- Author:
- Babak Farhang
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 |
SourceChannelStack
public SourceChannelStack(List<? extends ReadableByteChannel> sources)
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