Class JerseyChunkedInput

java.lang.Object
java.io.OutputStream
org.glassfish.jersey.netty.connector.internal.JerseyChunkedInput
All Implemented Interfaces:
io.netty.channel.ChannelFutureListener, io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>, io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>, Closeable, Flushable, AutoCloseable, EventListener

public class JerseyChunkedInput extends OutputStream implements io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>, io.netty.channel.ChannelFutureListener
Netty ChunkedInput implementation which also serves as an output stream to Jersey ContainerResponseContext.
Author:
Pavel Bucek
  • Constructor Details

    • JerseyChunkedInput

      public JerseyChunkedInput(io.netty.channel.Channel ctx)
  • Method Details

    • isEndOfInput

      public boolean isEndOfInput() throws Exception
      Specified by:
      isEndOfInput in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
      Throws:
      Exception
    • operationComplete

      public void operationComplete(io.netty.channel.ChannelFuture f) throws Exception
      Specified by:
      operationComplete in interface io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
      Throws:
      Exception
    • readChunk

      @Deprecated public io.netty.buffer.ByteBuf readChunk(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Deprecated.
      Specified by:
      readChunk in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
      Throws:
      Exception
    • readChunk

      public io.netty.buffer.ByteBuf readChunk(io.netty.buffer.ByteBufAllocator allocator) throws Exception
      Specified by:
      readChunk in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
      Throws:
      Exception
    • length

      public long length()
      Specified by:
      length in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
    • progress

      public long progress()
      Specified by:
      progress in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException
    • write

      public void write(int b) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException