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.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionprivate void checkSuspend(java.nio.channels.Channel ch)
throws java.io.IOException
java.io.IOException