Class OioByteStreamChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.oio.AbstractOioChannel
io.netty.channel.oio.AbstractOioByteChannel
io.netty.channel.oio.OioByteStreamChannel
- All Implemented Interfaces:
Channel, ChannelOutboundInvoker, AttributeMap, java.lang.Comparable<Channel>
- Direct Known Subclasses:
OioSocketChannel
Deprecated.
use NIO / EPOLL / KQUEUE transport.
Abstract base class for OIO Channels that are based on streams.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractChannel
AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface Channel
Channel.Unsafe -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final java.io.InputStreamDeprecated.private static final java.io.OutputStreamDeprecated.private java.io.InputStreamDeprecated.private java.io.OutputStreamDeprecated.private java.nio.channels.WritableByteChannelDeprecated.Fields inherited from class AbstractOioChannel
readPending, readTask, readWhenInactive, SO_TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOioByteStreamChannel(Channel parent) Deprecated.Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidactivate(java.io.InputStream is, java.io.OutputStream os) Deprecated.Activate this instance.protected intDeprecated.Return the number of bytes ready to read from the underlying Socket.private static voidcheckEOF(FileRegion region) Deprecated.protected voiddoClose()Deprecated.Close theChannelprotected intdoReadBytes(ByteBuf buf) Deprecated.Read bytes from the underlying Socket.protected voiddoWriteBytes(ByteBuf buf) Deprecated.Write the data which is hold by theByteBufto the underlying Socket.protected voiddoWriteFileRegion(FileRegion region) Deprecated.Write the data which is hold by theFileRegionto the underlying Socket.booleanisActive()Deprecated.Returntrueif theChannelis active and so connected.Methods inherited from class AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, isInputShutdown, metadata, shutdownInputMethods inherited from class AbstractOioChannel
clearReadPending, doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPendingMethods inherited from class AbstractChannel
closeFuture, compareTo, doBind, doDeregister, doDisconnect, doRegister, doRegister, doShutdownOutput, equals, eventLoop, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, localAddress, localAddress0, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, remoteAddress, remoteAddress0, toString, unsafe, validateFileRegion, voidPromiseMethods inherited from class DefaultAttributeMap
attr, hasAttrMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface AttributeMap
attr, hasAttrMethods inherited from interface Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, config, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, flush, getOption, isOpen, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, read, setOption, write, write, writeAndFlush, writeAndFlush
-
Field Details
-
CLOSED_IN
private static final java.io.InputStream CLOSED_INDeprecated. -
CLOSED_OUT
private static final java.io.OutputStream CLOSED_OUTDeprecated. -
is
private java.io.InputStream isDeprecated. -
os
private java.io.OutputStream osDeprecated. -
outChannel
private java.nio.channels.WritableByteChannel outChannelDeprecated.
-
-
Constructor Details
-
OioByteStreamChannel
-
-
Method Details
-
activate
protected final void activate(java.io.InputStream is, java.io.OutputStream os) Deprecated.Activate this instance. After this callisActive()will returntrue. -
isActive
-
available
protected int available()Deprecated.Description copied from class:AbstractOioByteChannelReturn the number of bytes ready to read from the underlying Socket.- Specified by:
availablein classAbstractOioByteChannel
-
doReadBytes
Deprecated.Description copied from class:AbstractOioByteChannelRead bytes from the underlying Socket.- Specified by:
doReadBytesin classAbstractOioByteChannel- Parameters:
buf- theByteBufinto which the read bytes will be written- Returns:
- amount the number of bytes read. This may return a negative amount if the underlying Socket was closed
- Throws:
java.lang.Exception- is thrown if an error occurred
-
doWriteBytes
Deprecated.Description copied from class:AbstractOioByteChannelWrite the data which is hold by theByteBufto the underlying Socket.- Specified by:
doWriteBytesin classAbstractOioByteChannel- Parameters:
buf- theByteBufwhich holds the data to transfer- Throws:
java.lang.Exception- is thrown if an error occurred
-
doWriteFileRegion
Deprecated.Description copied from class:AbstractOioByteChannelWrite the data which is hold by theFileRegionto the underlying Socket.- Specified by:
doWriteFileRegionin classAbstractOioByteChannel- Parameters:
region- theFileRegionwhich holds the data to transfer- Throws:
java.lang.Exception- is thrown if an error occurred
-
checkEOF
Deprecated.- Throws:
java.io.IOException
-
doClose
protected void doClose() throws java.lang.ExceptionDeprecated.Description copied from class:AbstractChannelClose theChannel- Specified by:
doClosein classAbstractChannel- Throws:
java.lang.Exception
-