Class ConsumingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.api.client.http.ConsumingInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
This class in meant to wrap an
InputStream so that all bytes in the steam are read and
discarded on InputStream.close(). This ensures that the underlying connection has the
option to be reused.-
Field Summary
FieldsFields inherited from class FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
-
Field Details
-
closed
private boolean closed
-
-
Constructor Details
-
ConsumingInputStream
ConsumingInputStream(InputStream inputStream)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-