Package com.helger.as2lib.util.http
Class ChunkedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.helger.commons.io.stream.WrappedInputStream
-
- com.helger.as2lib.util.http.ChunkedInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ChunkedInputStream extends com.helger.commons.io.stream.WrappedInputStreamStream to read a chunked body stream. Input stream should be at the beginning of a chunk, i.e. at the body beginning (after the end of headers marker). The resulting stream reads the data through the chunks.- Author:
- Ziv Harpaz
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ChunkedInputStream(InputStream aIS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread()intread(byte[] aBuf, int nOffset, int nLength)-
Methods inherited from class com.helger.commons.io.stream.WrappedInputStream
getWrappedInputStream, toString
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ChunkedInputStream
public ChunkedInputStream(@Nonnull @WillCloseWhenClosed InputStream aIS)
-
-
Method Detail
-
read
public final int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public final int read(@Nonnull byte[] aBuf, int nOffset, int nLength) throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
-