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
NettyChunkedInputimplementation which also serves as an output stream to JerseyContainerResponseContext.- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description JerseyChunkedInput(io.netty.channel.Channel ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()voidflush()booleanisEndOfInput()longlength()voidoperationComplete(io.netty.channel.ChannelFuture f)longprogress()io.netty.buffer.ByteBufreadChunk(io.netty.buffer.ByteBufAllocator allocator)io.netty.buffer.ByteBufreadChunk(io.netty.channel.ChannelHandlerContext ctx)Deprecated.voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Method Detail
-
isEndOfInput
public boolean isEndOfInput() throws Exception- Specified by:
isEndOfInputin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
Exception
-
operationComplete
public void operationComplete(io.netty.channel.ChannelFuture f) throws Exception- Specified by:
operationCompletein interfaceio.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:
readChunkin interfaceio.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:
readChunkin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
Exception
-
length
public long length()
- Specified by:
lengthin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
-
progress
public long progress()
- Specified by:
progressin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
-