public abstract class OioByteStreamChannel extends AbstractOioByteChannel
AbstractChannel.AbstractUnsafeChannel.UnsafeSO_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
OioByteStreamChannel(Channel parent)
创建一个新的实例
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(java.io.InputStream is, java.io.OutputStream os)
激活这个实例。
|
protected int |
available()
返回准备从底层套接字读取的字节数。
|
protected void |
doClose()
关闭 Channel
|
protected int |
doReadBytes(ByteBuf buf)
从底层套接字读取字节。
|
protected void |
doWriteBytes(ByteBuf buf)
将 ByteBuf所保存的数据写入底层套接字。
|
protected void |
doWriteFileRegion(FileRegion region)
将由 FileRegion持有的数据写入底层套接字。
|
boolean |
isActive()
如果 Channel处于活动状态并已连接,则返回true 。
|
doRead, doWrite, filterOutboundMessage, isInputShutdown, metadata, shutdownInputclearReadPending, doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPendingalloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doDeregister, doDisconnect, doRegister, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushattr, hasAttrclone, finalize, getClass, notify, notifyAll, wait, wait, waitattr, hasAttrprotected final void activate(java.io.InputStream is,
java.io.OutputStream os)
isActive()将返回true 。
protected int available()
AbstractOioByteChannel
available在课堂上
AbstractOioByteChannel
protected int doReadBytes(ByteBuf buf) throws java.lang.Exception
AbstractOioByteChannel
doReadBytes在课堂上
AbstractOioByteChannel
buf - 写入读取字节的ByteBuf
java.lang.Exception - 发生错误时抛出
protected void doWriteBytes(ByteBuf buf) throws java.lang.Exception
AbstractOioByteChannel
ByteBuf保存的数据写入底层套接字。
doWriteBytes在课堂上
AbstractOioByteChannel
buf - 持有要传输的数据的ByteBuf
java.lang.Exception - 发生错误时抛出
protected void doWriteFileRegion(FileRegion region) throws java.lang.Exception
AbstractOioByteChannel
FileRegion保存的数据写入底层套接字。
doWriteFileRegion在课堂上
AbstractOioByteChannel
region - 持有要传输的数据的FileRegion
java.lang.Exception - 发生错误时抛出
protected void doClose()
throws java.lang.Exception
AbstractChannel
Channel
doClose在课堂上
AbstractChannel
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.