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
Constructors Constructor Description ChunkedInputStream(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
HttpHeader
getTrailers()
Return the http header trailersint
read()
int
read(byte[] buf, int off, int len)
long
skip(long total)
-
-
-
Constructor Detail
-
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 Detail
-
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
public HttpHeader 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
-
-