Class ChunkedInputStream
java.lang.Object
java.io.InputStream
org.sblim.cimclient.internal.http.io.ChunkedInputStream
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ChunkedInputStream
extends java.io.InputStream
Class ChunkedInputStream implements an input stream for chunked messages
-
Constructor Summary
ConstructorsConstructorDescriptionChunkedInputStream
(java.io.InputStream pStream, java.lang.String pTrailerFields) Ctor.ChunkedInputStream
(java.io.InputStream pStream, java.lang.String pTrailerFields, java.lang.String pOrigin) Ctor. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChunkedInputStream
public ChunkedInputStream(java.io.InputStream pStream, java.lang.String pTrailerFields) Ctor.- Parameters:
pStream
- The stream to create this one uponpTrailerFields
- The names of trailer fields
-
ChunkedInputStream
public ChunkedInputStream(java.io.InputStream pStream, java.lang.String pTrailerFields, java.lang.String pOrigin) Ctor.- Parameters:
pStream
- The stream to create this one uponpTrailerFields
- The names of trailer fieldspOrigin
- The origin of the stream (response, indication request, etc.)
-
-
Method Details
-
read
public int read() throws java.io.IOException- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int off, int len) throws java.io.IOException - Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getTrailers
Return the http header trailers- Returns:
- The trailers
-
skip
public long skip(long total) throws java.io.IOException - Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
available
public int available()- Overrides:
available
in classjava.io.InputStream
- Returns:
- int
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-