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.FilterInputStreamThis class in meant to wrap anInputStreamso 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 booleanclosed
-
Constructor Summary
Constructors Constructor Description ConsumingInputStream(java.io.InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()
-