private static class HTTPResource.ConnectionClosingInputStream extends InputStream
InputStream represented by an HttpResponse
that closes the stream and the HttpResponse when close() is invoked.| Modifier and Type | Field and Description |
|---|---|
private org.apache.http.HttpResponse |
response
HTTP response that is being wrapped.
|
private InputStream |
stream
Stream owned by the given HTTP response.
|
| Constructor and Description |
|---|
ConnectionClosingInputStream(org.apache.http.HttpResponse httpResponse)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int readLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
private final org.apache.http.HttpResponse response
private final InputStream stream
public ConnectionClosingInputStream(@Nonnull org.apache.http.HttpResponse httpResponse) throws IOException
httpResponse - HTTP method that was invokedIOException - if there is a problem getting the entity content input stream from the responsepublic 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–2019 Shibboleth Consortium. All rights reserved.