Class WeaveChunkedStream
- java.lang.Object
-
- org.mule.weave.v2.module.http.netty.WeaveChunkedStream
-
- All Implemented Interfaces:
io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>
public class WeaveChunkedStream extends java.lang.Object implements io.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>Implementation ofChunkedStreamwhich does not rely onInputStream.available()returning accurate data. It will simply try to fill its buffer by reading several times from the stream and send it whenever the buffer is full or the stream empty.
-
-
Constructor Summary
Constructors Constructor Description WeaveChunkedStream(java.io.InputStream in, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()booleanisEndOfInput()longlength()longprogress()io.netty.buffer.ByteBufreadChunk(io.netty.buffer.ByteBufAllocator allocator)io.netty.buffer.ByteBufreadChunk(io.netty.channel.ChannelHandlerContext ctx)Deprecated.longtransferredBytes()
-
-
-
Method Detail
-
transferredBytes
public long transferredBytes()
-
isEndOfInput
public boolean isEndOfInput() throws java.lang.Exception- Specified by:
isEndOfInputin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
java.lang.Exception
-
readChunk
@Deprecated public io.netty.buffer.ByteBuf readChunk(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.ExceptionDeprecated.- Specified by:
readChunkin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
java.lang.Exception
-
readChunk
public io.netty.buffer.ByteBuf readChunk(io.netty.buffer.ByteBufAllocator allocator) throws java.lang.Exception- Specified by:
readChunkin interfaceio.netty.handler.stream.ChunkedInput<io.netty.buffer.ByteBuf>- Throws:
java.lang.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>
-
-