NETTY-408 ChunkedStream generates 1-byte chunks for wrapped input streams that does have sane implementation of available() method

* Updated JavaDoc so that users don't specify an InputStream with poor available() implementation.
This commit is contained in:
Trustin Lee 2011-08-02 09:47:11 +09:00
parent e0eb72618a
commit dc33e99872

View File

@ -23,6 +23,12 @@ import java.io.PushbackInputStream;
/**
* A {@link ChunkedInput} that fetches data from an {@link InputStream} chunk by
* chunk.
* <p>
* Please note that the {@link InputStream} instance that feeds data into
* {@link ChunkedStream} must implement {@link InputStream#available()} as
* accurately as possible, rather than using the default implementation.
* Otherwise, {@link ChunkedStream} will generate many too small chunks or
* block unnecessarily often.
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>