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(java.nio.ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length) |
void |
reset()
Reset the channel
|
void |
setAppReadBufHandler(ApplicationBufferHandler handler) |
void |
setIOChannel(java.nio.channels.SocketChannel sc) |
java.lang.String |
toString() |
int |
write(java.nio.ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
checkInterruptStatus, close, flush, flushOutbound, getAppReadBufHandler, getBufHandler, getIOChannel, getOutboundRemaining, handshake, isClosing, isHandshakeComplete, read, writepublic void close()
throws java.io.IOException
NioChannelclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in class NioChanneljava.io.IOException - If an I/O error occurspublic boolean isOpen()
NioChannelisOpen in interface java.nio.channels.ChannelisOpen in class NioChannelpublic void reset()
throws java.io.IOException
NioChannelreset in class NioChanneljava.io.IOException - If a problem was encountered resetting the channelpublic void free()
NioChannelfree in class NioChannelpublic void setIOChannel(java.nio.channels.SocketChannel sc)
setIOChannel in class NioChannelpublic void setAppReadBufHandler(ApplicationBufferHandler handler)
setAppReadBufHandler in class NioChannelpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
NioChannelread in interface java.nio.channels.ReadableByteChannelread in class NioChanneldst - The buffer into which bytes are to be transferredjava.io.IOException - If some other I/O error occurspublic long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChannelread in class NioChanneljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
NioChannelwrite in interface java.nio.channels.WritableByteChannelwrite in class NioChannelsrc - The buffer from which bytes are to be retrievedjava.io.IOException - If some other I/O error occurspublic long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
write in interface java.nio.channels.GatheringByteChannelwrite in class NioChanneljava.io.IOExceptionpublic java.lang.String toString()
toString in class NioChannelCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.