Package com.google.api.client.http
Class ConsumingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.google.api.client.http.ConsumingInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
final class ConsumingInputStream extends java.io.FilterInputStream
This class in meant to wrap anInputStream
so that all bytes in the steam are read and discarded onInputStream.close()
. This ensures that the underlying connection has the option to be reused.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
closed
-
Constructor Summary
Constructors Constructor Description ConsumingInputStream(java.io.InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-