Package org.geotools.http
Class DefaultHttpResponse
Object
DefaultHttpResponse
- All Implemented Interfaces:
HTTPResponse
HTTPResponse that uses URLConnection as its basis.
- Author:
- Roar Brænden
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this HTTP response and cleans up any resource being held.Short cut forgetResponseHeader("Content-Type")getResponseHeader(String headerName) Returns the value of the requested HTTP response header, ornullif not set.Returns the HTTP response content byte stream, automatically recognizing gzip encoded responses and returning an uncompressing stream if that's the case.
-
Constructor Details
-
DefaultHttpResponse
- Throws:
IOException
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:HTTPResponseDisposes this HTTP response and cleans up any resource being held.Multiple invocations of this method shall not raise an exception but return silently.
- Specified by:
disposein interfaceHTTPResponse
-
getContentType
Description copied from interface:HTTPResponseShort cut forgetResponseHeader("Content-Type")- Specified by:
getContentTypein interfaceHTTPResponse
-
getResponseHeader
Description copied from interface:HTTPResponseReturns the value of the requested HTTP response header, ornullif not set.- Specified by:
getResponseHeaderin interfaceHTTPResponse
-
getResponseStream
Description copied from interface:HTTPResponseReturns the HTTP response content byte stream, automatically recognizing gzip encoded responses and returning an uncompressing stream if that's the case.- Specified by:
getResponseStreamin interfaceHTTPResponse- Throws:
IOException- if such happens when obtaining the response stream.
-
getResponseCharset
- Specified by:
getResponseCharsetin interfaceHTTPResponse- Returns:
- the response charset parsed out of the content type response header, if any, or
nullotherwise.
-