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
,RxtxChannel
@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 inherited from class io.netty.channel.oio.AbstractOioChannel
SO_TIMEOUT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OioByteStreamChannel(Channel parent)
Deprecated.Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
activate(java.io.InputStream is, java.io.OutputStream os)
Deprecated.Activate this instance.protected int
available()
Deprecated.Return the number of bytes ready to read from the underlying Socket.protected void
doClose()
Deprecated.Close theChannel
protected int
doReadBytes(ByteBuf buf)
Deprecated.Read bytes from the underlying Socket.protected void
doWriteBytes(ByteBuf buf)
Deprecated.Write the data which is hold by theByteBuf
to the underlying Socket.protected void
doWriteFileRegion(FileRegion region)
Deprecated.Write the data which is hold by theFileRegion
to the underlying Socket.boolean
isActive()
Deprecated.Returntrue
if theChannel
is 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
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, voidPromise
-
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
-
Methods inherited from interface io.netty.channel.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
-
-
-
-
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:Channel
Returntrue
if theChannel
is active and so connected.
-
available
protected int available()
Deprecated.Description copied from class:AbstractOioByteChannel
Return the number of bytes ready to read from the underlying Socket.- Specified by:
available
in classAbstractOioByteChannel
-
doReadBytes
protected int doReadBytes(ByteBuf buf) throws java.lang.Exception
Deprecated.Description copied from class:AbstractOioByteChannel
Read bytes from the underlying Socket.- Specified by:
doReadBytes
in classAbstractOioByteChannel
- Parameters:
buf
- theByteBuf
into 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:AbstractOioByteChannel
Write the data which is hold by theByteBuf
to the underlying Socket.- Specified by:
doWriteBytes
in classAbstractOioByteChannel
- Parameters:
buf
- theByteBuf
which 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:AbstractOioByteChannel
Write the data which is hold by theFileRegion
to the underlying Socket.- Specified by:
doWriteFileRegion
in classAbstractOioByteChannel
- Parameters:
region
- theFileRegion
which holds the data to transfer- Throws:
java.lang.Exception
- is thrown if an error occurred
-
doClose
protected void doClose() throws java.lang.Exception
Deprecated.Description copied from class:AbstractChannel
Close theChannel
- Specified by:
doClose
in classAbstractChannel
- Throws:
java.lang.Exception
-
-