public interface ChunkedInput<B>
ChunkedWriteHandler
.Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the resources associated with the input.
|
boolean |
isEndOfInput()
Return
true if and only if there is no data left in the stream
and the stream has reached at its end. |
long |
length()
Returns the length of the input.
|
long |
progress()
Returns current transfer progress.
|
B |
readChunk(ByteBufAllocator allocator)
Fetches a chunked data from the stream.
|
B |
readChunk(ChannelHandlerContext ctx)
Deprecated.
Use
readChunk(ByteBufAllocator) .
Fetches a chunked data from the stream. Once this method returns the last chunk
and thus the stream has reached at its end, any subsequent |
boolean isEndOfInput() throws Exception
true
if and only if there is no data left in the stream
and the stream has reached at its end.Exception
void close() throws Exception
Exception
@Deprecated B readChunk(ChannelHandlerContext ctx) throws Exception
readChunk(ByteBufAllocator)
.
Fetches a chunked data from the stream. Once this method returns the last chunk
and thus the stream has reached at its end, any subsequent isEndOfInput()
call must return true
.
ctx
- The context which provides a ByteBufAllocator
if buffer allocation is necessary.null
if there is no data left in the stream.
Please note that null
does not necessarily mean that the
stream has reached at its end. In a slow stream, the next chunk
might be unavailable just momentarily.Exception
B readChunk(ByteBufAllocator allocator) throws Exception
isEndOfInput()
call must return true
.allocator
- ByteBufAllocator
if buffer allocation is necessary.null
if there is no data left in the stream.
Please note that null
does not necessarily mean that the
stream has reached at its end. In a slow stream, the next chunk
might be unavailable just momentarily.Exception
long length()
long progress()
Copyright © 2008–2017 The Netty Project. All rights reserved.