|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--com.ibm.net.ssl.internal.www.protocol.https.ChunkedInputStream
Read Transfer-Encoding chunks.
Constructor Summary | |
ChunkedInputStream(java.io.InputStream in)
Creates a BufferedInputStream
and saves its argument, the input stream
in , for later use. |
Method Summary | |
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
void |
print()
|
int |
read()
See the general contract of the read
method of InputStream . |
int |
read(byte[] b,
int off,
int len)
Reads bytes from this byte-input stream into the specified byte array, starting at the given offset. |
Methods inherited from class java.io.InputStream |
mark,
markSupported,
read,
reset,
skip |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ChunkedInputStream(java.io.InputStream in) throws java.io.IOException
BufferedInputStream
and saves its argument, the input stream
in
, for later use. An internal
buffer array is created and stored in buf
.in
- the underlying input stream.Method Detail |
public void print()
public int read() throws java.io.IOException
read
method of InputStream
.-1
if the end of the
stream is reached.java.io.FilterInputStream#in
public int read(byte[] b, int off, int len) throws java.io.IOException
This method implements the general contract of the corresponding
method of
the read
class. As an additional
convenience, it attempts to read as many bytes as possible by repeatedly
invoking the InputStream
read
method of the underlying stream. This
iterated read
continues until one of the following
conditions becomes true:
read
method of the underlying stream returns
-1
, indicating end-of-file, or
available
method of the underlying stream
returns zero, indicating that further input requests would block.
read
on the underlying stream returns
-1
to indicate end-of-file then this method returns
-1
. Otherwise this method returns the number of bytes
actually read.
Subclasses of this class are encouraged, but not required, to attempt to read as many bytes as possible in the same fashion.
b
- destination buffer.off
- offset at which to start storing bytes.len
- maximum number of bytes to read.-1
if the end of
the stream has been reached.public int available() throws java.io.IOException
The available
method of
BufferedInputStream
returns the sum of the the number
of bytes remaining to be read in the buffer
(count - pos
)
and the result of calling the available
method of the
underlying input stream.
java.io.FilterInputStream#in
public void close() throws java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |