Class 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 Detail

      • JerseyChunkedInput

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

      • 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>