public interface ChunkedInput<B>
ChunkedWriteHandler.| 限定符和类型 | 方法和说明 |
|---|---|
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)
已过时。
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 java.lang.Exception
true if and only if there is no data left in the stream
and the stream has reached at its end.java.lang.Exceptionvoid close()
throws java.lang.Exception
java.lang.Exception@Deprecated B readChunk(ChannelHandlerContext ctx) throws java.lang.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.java.lang.ExceptionB readChunk(ByteBufAllocator allocator) throws java.lang.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.java.lang.Exceptionlong length()
long progress()