public static class NioChannel.ClosedNioChannel extends NioChannel
NioChannel.ClosedNioChannelbufHandler, emptyBuf, sc, sm, socketWrapper| Constructor and Description |
|---|
ClosedNioChannel() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this channel.
|
void |
free()
Free the channel memory
|
boolean |
isOpen()
Tells whether or not this channel is open.
|
int |
read(ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
long |
read(ByteBuffer[] dsts,
int offset,
int length) |
void |
reset(SocketChannel channel,
NioEndpoint.NioSocketWrapper socketWrapper)
Reset the channel
|
void |
setAppReadBufHandler(ApplicationBufferHandler handler) |
String |
toString() |
int |
write(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
long |
write(ByteBuffer[] srcs,
int offset,
int length) |
checkInterruptStatus, close, flush, flushOutbound, getAppReadBufHandler, getBufHandler, getIOChannel, getOutboundRemaining, handshake, isClosing, isHandshakeComplete, read, writepublic void close()
throws IOException
NioChannelclose in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class NioChannelIOException - If an I/O error occurspublic boolean isOpen()
NioChannelisOpen in interface ChannelisOpen in class NioChanneltrue if, and only if, this channel is openpublic void reset(SocketChannel channel, NioEndpoint.NioSocketWrapper socketWrapper) throws IOException
NioChannelreset in class NioChannelchannel - the socket channelsocketWrapper - the socket wrapperIOException - If a problem was encountered resetting the channelpublic void free()
NioChannelfree in class NioChannelpublic void setAppReadBufHandler(ApplicationBufferHandler handler)
setAppReadBufHandler in class NioChannelpublic int read(ByteBuffer dst) throws IOException
NioChannelread in interface ReadableByteChannelread in class NioChanneldst - The buffer into which bytes are to be transferred-1 if
the channel has reached end-of-streamIOException - If some other I/O error occurspublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read in interface ScatteringByteChannelread in class NioChannelIOExceptionpublic int write(ByteBuffer src) throws IOException
NioChannelwrite in interface WritableByteChannelwrite in class NioChannelsrc - The buffer from which bytes are to be retrievedIOException - If some other I/O error occurspublic long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface GatheringByteChannelwrite in class NioChannelIOExceptionpublic String toString()
toString in class NioChannelCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.