Package com.github.sardine.impl.io
Class HttpMethodReleaseInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.github.sardine.impl.io.ByteCountInputStream
com.github.sardine.impl.io.HttpMethodReleaseInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public class HttpMethodReleaseInputStream extends ByteCountInputStream
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HttpMethodReleaseInputStream(org.apache.http.HttpResponse response) -
Method Summary
Modifier and Type Method Description voidclose()This will force close the connection if the content has not been fully consumedMethods inherited from class com.github.sardine.impl.io.ByteCountInputStream
getByteCount, read, read, read, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
HttpMethodReleaseInputStream
- Parameters:
response- The HTTP response to read from- Throws:
IOException- If there is a problem reading from the responseNullPointerException- If the response has no message entity
-
-
Method Details
-
close
This will force close the connection if the content has not been fully consumed- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException- if an I/O error occurs- See Also:
Closeable.close(),HttpConnection.shutdown()
-