Package io.netty.channel.oio
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 public abstract class OioByteStreamChannel extends AbstractOioByteChannel
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 io.netty.channel.AbstractChannel
AbstractChannel.AbstractUnsafe
-
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
-
Field Summary
Fields Modifier and Type Field Description private static java.io.InputStreamCLOSED_INDeprecated.private static java.io.OutputStreamCLOSED_OUTDeprecated.private java.io.InputStreamisDeprecated.private java.io.OutputStreamosDeprecated.private java.nio.channels.WritableByteChanneloutChannelDeprecated.-
Fields inherited from class io.netty.channel.oio.AbstractOioChannel
readPending, SO_TIMEOUT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOioByteStreamChannel(Channel parent)Deprecated.Create a new instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidactivate(java.io.InputStream is, java.io.OutputStream os)Deprecated.Activate this instance.protected intavailable()Deprecated.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 io.netty.channel.oio.AbstractOioByteChannel
doRead, doWrite, filterOutboundMessage, isInputShutdown, metadata, shutdownInput
-
Methods inherited from class io.netty.channel.oio.AbstractOioChannel
clearReadPending, doBeginRead, doConnect, isCompatible, isReadPending, newUnsafe, setReadPending
-
Methods inherited from class io.netty.channel.AbstractChannel
alloc, 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, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
-
Methods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttr
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
-
-
-
Field Detail
-
CLOSED_IN
private static final java.io.InputStream CLOSED_IN
Deprecated.
-
CLOSED_OUT
private static final java.io.OutputStream CLOSED_OUT
Deprecated.
-
is
private java.io.InputStream is
Deprecated.
-
os
private java.io.OutputStream os
Deprecated.
-
outChannel
private java.nio.channels.WritableByteChannel outChannel
Deprecated.
-
-
Method Detail
-
activate
protected final void activate(java.io.InputStream is, java.io.OutputStream os)Deprecated.Activate this instance. After this callisActive()will returntrue.
-
isActive
public boolean isActive()
Deprecated.Description copied from interface:ChannelReturntrueif theChannelis active and so connected.
-
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
protected int doReadBytes(ByteBuf buf) throws java.lang.Exception
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
protected void doWriteBytes(ByteBuf buf) throws java.lang.Exception
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
protected void doWriteFileRegion(FileRegion region) throws java.lang.Exception
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
private static void checkEOF(FileRegion region) throws java.io.IOException
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
-
-