Closes this input stream and releases any system resources associated with the stream.
Closes this input stream and releases any system resources associated with the stream. Then the HttpURLConnection is disconnected, releasing any system resources associated with it.
if an I/O error occurs.
Reads the next byte of data from the input stream.
Reads the next byte of data from the input stream. The value byte is
returned as an int
in the range 0
to
255
. If no byte is available because the end of the stream
has been reached, the value -1
is returned.
When the last available byte has been read in, the stream is automatically closed and the connection is automatically disconnected.
This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
the next byte of data, or -1
if the end of the
stream is reached.
if an I/O error occurs.
Constructs a wrapper for an HTTP input stream that ensures that its parent HTTP connection is disconnected when the input stream is closed. The input stream is self-closing: when consuming data from the stream, once the end is reached the stream will automatically close and the connection will be disconnected.