private static class HttpResource.ConnectionClosingInputStream extends InputStream
InputStream returned by a HttpMethod that closes the stream and releases the
HTTP connection when close() is invoked.| Modifier and Type | Field and Description |
|---|---|
private org.apache.commons.httpclient.HttpMethod |
method
HTTP method that was invoked.
|
private InputStream |
stream
Stream owned by the given HTTP method.
|
| Constructor and Description |
|---|
HttpResource.ConnectionClosingInputStream(org.apache.commons.httpclient.HttpMethod httpMethod,
InputStream returnedStream)
Constructor.
|
private final org.apache.commons.httpclient.HttpMethod method
private final InputStream stream
public HttpResource.ConnectionClosingInputStream(org.apache.commons.httpclient.HttpMethod httpMethod,
InputStream returnedStream)
httpMethod - HTTP method that was invokedreturnedStream - stream owned by the given HTTP methodpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic void mark(int readLimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionCopyright © 1999-2015. All Rights Reserved.