private class Pipe.MultiChannel
extends java.lang.Object
implements java.nio.channels.ByteChannel
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.nio.channels.Channel> |
channels |
(package private) int |
index |
protected java.util.concurrent.atomic.AtomicBoolean |
opened |
protected java.util.List<java.nio.channels.Channel> |
toClose |
Modifier | Constructor and Description |
---|---|
private |
MultiChannel() |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(java.nio.channels.Channel channel,
boolean toclose) |
private void |
checkSuspend(java.nio.channels.Channel ch) |
void |
close() |
boolean |
isOpen() |
int |
read(java.nio.ByteBuffer dst) |
int |
write(java.nio.ByteBuffer src) |
protected final java.util.List<java.nio.channels.Channel> channels
protected final java.util.List<java.nio.channels.Channel> toClose
protected final java.util.concurrent.atomic.AtomicBoolean opened
int index
public void addChannel(java.nio.channels.Channel channel, boolean toclose)
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
java.io.IOException
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
java.io.IOException
private void checkSuspend(java.nio.channels.Channel ch) throws java.io.IOException
java.io.IOException