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
-
Field Summary
Fields inherited from interface io.netty.channel.ChannelFutureListener
CLOSE, CLOSE_ON_FAILURE, FIRE_EXCEPTION_ON_FAILURE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
boolean
long
length()
void
operationComplete
(io.netty.channel.ChannelFuture f) long
progress()
io.netty.buffer.ByteBuf
readChunk
(io.netty.buffer.ByteBufAllocator allocator) io.netty.buffer.ByteBuf
readChunk
(io.netty.channel.ChannelHandlerContext ctx) Deprecated.void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
JerseyChunkedInput
public JerseyChunkedInput(io.netty.channel.Channel ctx)
-
-
Method Details
-
isEndOfInput
- Specified by:
isEndOfInput
in interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
- Throws:
Exception
-
operationComplete
- Specified by:
operationComplete
in 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:
readChunk
in 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:
readChunk
in interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
- Throws:
Exception
-
length
public long length()- Specified by:
length
in interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
-
progress
public long progress()- Specified by:
progress
in interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-