public class NamedChannel extends Object implements ByteChannel
| Modifier and Type | Field and Description |
|---|---|
protected DataChannel |
channel |
| Constructor and Description |
|---|
NamedChannel(DataChannel channel) |
NamedChannel(DataChannel channel,
NameIdPair nameIdPair) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
DataChannel |
getChannel() |
NameIdPair |
getNameIdPair() |
boolean |
isOpen() |
int |
read(ByteBuffer dst) |
void |
setNameIdPair(NameIdPair nameIdPair) |
String |
toString() |
int |
write(ByteBuffer src) |
protected final DataChannel channel
public NamedChannel(DataChannel channel, NameIdPair nameIdPair)
public NamedChannel(DataChannel channel)
public void setNameIdPair(NameIdPair nameIdPair)
public NameIdPair getNameIdPair()
public DataChannel getChannel()
public int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface WritableByteChannelIOExceptionCopyright © 2024. All rights reserved.