Package org.geotools.http
Class DelegateHTTPResponse
- Object
-
- DelegateHTTPResponse
-
- All Implemented Interfaces:
HTTPResponse
public class DelegateHTTPResponse extends Object implements HTTPResponse
-
-
Field Summary
Fields Modifier and Type Field Description protected HTTPResponse
delegate
-
Constructor Summary
Constructors Constructor Description DelegateHTTPResponse(HTTPResponse delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes this HTTP response and cleans up any resource being held.String
getContentType()
Short cut forgetResponseHeader("Content-Type")
String
getResponseCharset()
String
getResponseHeader(String headerName)
Returns the value of the requested HTTP response header, ornull
if 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.
-
-
-
Field Detail
-
delegate
protected HTTPResponse delegate
-
-
Constructor Detail
-
DelegateHTTPResponse
public DelegateHTTPResponse(HTTPResponse delegate)
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:HTTPResponse
Disposes 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:
dispose
in interfaceHTTPResponse
-
getContentType
public String getContentType()
Description copied from interface:HTTPResponse
Short cut forgetResponseHeader("Content-Type")
- Specified by:
getContentType
in interfaceHTTPResponse
-
getResponseHeader
public String getResponseHeader(String headerName)
Description copied from interface:HTTPResponse
Returns the value of the requested HTTP response header, ornull
if not set.- Specified by:
getResponseHeader
in interfaceHTTPResponse
-
getResponseStream
public InputStream getResponseStream() throws IOException
Description copied from interface:HTTPResponse
Returns the HTTP response content byte stream, automatically recognizing gzip encoded responses and returning an uncompressing stream if that's the case.- Specified by:
getResponseStream
in interfaceHTTPResponse
- Throws:
IOException
- if such happens when obtaining the response stream.
-
getResponseCharset
public String getResponseCharset()
- Specified by:
getResponseCharset
in interfaceHTTPResponse
- Returns:
- the response charset parsed out of the content type response header, if any, or
null
otherwise.
-
-