Class 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.
  • Field Details

    • 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.
  • Constructor Details

    • OioByteStreamChannel

      protected OioByteStreamChannel(Channel parent)
      Deprecated.
      Create a new instance
      Parameters:
      parent - the parent Channel which was used to create this instance. This can be null if the invalid input: '{@link /*missing*/}' has no parent as it was created by your self.
  • Method Details

    • activate

      protected final void activate(java.io.InputStream is, java.io.OutputStream os)
      Deprecated.
      Activate this instance. After this call isActive() will return true.
    • isActive

      public boolean isActive()
      Deprecated.
      Description copied from interface: Channel
      Return true if the Channel 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 class AbstractOioByteChannel
    • 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 class AbstractOioByteChannel
      Parameters:
      buf - the ByteBuf 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 the ByteBuf to the underlying Socket.
      Specified by:
      doWriteBytes in class AbstractOioByteChannel
      Parameters:
      buf - the ByteBuf 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 the FileRegion to the underlying Socket.
      Specified by:
      doWriteFileRegion in class AbstractOioByteChannel
      Parameters:
      region - the FileRegion which 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.Exception
      Deprecated.
      Description copied from class: AbstractChannel
      Close the Channel
      Specified by:
      doClose in class AbstractChannel
      Throws:
      java.lang.Exception