public static class SimpleHttpClient.SimpleHTTPResponse extends Object implements HTTPResponse
| Constructor and Description | 
|---|
| SimpleHTTPResponse(URLConnection connection) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | dispose()Disposes this HTTP response and cleans up any resource being held. | 
| String | getContentType()Short cut for  getResponseHeader("Content-Type") | 
| String | getResponseCharset() | 
| String | getResponseHeader(String headerName)Returns the value of the requested HTTP response header, or  nullif not set. | 
| InputStream | getResponseStream()Returns the HTTP response content byte stream, automatically recognizing gzip encoded
 responses and returning an uncompressing stream if that's the case. | 
public SimpleHTTPResponse(URLConnection connection) throws IOException
IOExceptionpublic void dispose()
HTTPResponseMultiple invocations of this method shall not raise an exception but return silently.
dispose in interface HTTPResponseHTTPResponse.dispose()public String getContentType()
HTTPResponsegetResponseHeader("Content-Type")getContentType in interface HTTPResponseHTTPResponse.getContentType()public String getResponseHeader(String headerName)
HTTPResponsenull if not set.getResponseHeader in interface HTTPResponsepublic InputStream getResponseStream() throws IOException
HTTPResponsegetResponseStream in interface HTTPResponseIOException - if such happens when obtaining the response stream.HTTPResponse.getResponseStream()public String getResponseCharset()
getResponseCharset in interface HTTPResponsenull otherwise.HTTPResponse.getResponseCharset()Copyright © 1996–2019 Geotools. All rights reserved.