org.geotools.data.wfs.protocol.http
Class DefaultHTTPProtocol.HTTPClientResponse

java.lang.Object
  extended by org.geotools.data.wfs.protocol.http.DefaultHTTPProtocol.HTTPClientResponse
All Implemented Interfaces:
HTTPResponse
Enclosing class:
DefaultHTTPProtocol

public class DefaultHTTPProtocol.HTTPClientResponse
extends java.lang.Object
implements HTTPResponse

An HTTPResponse wrapping an executed GetMethod or PostMethod from the apache commons-httpclient package

Author:
Gabriel Roldan (OpenGeo)

Constructor Summary
DefaultHTTPProtocol.HTTPClientResponse(org.apache.commons.httpclient.HttpMethodBase method)
           
 
Method Summary
 java.lang.String getContentType()
          Shortcut method to get the response content-type header
 java.lang.String getResponseCharset()
          Returns the response charset identifier as extracted from the HTTP header, if any.
 java.lang.String getResponseHeader(java.lang.String headerName)
          Returns the value of the given HTTP response header.
 java.io.InputStream getResponseStream()
          Returns the stream to the response contents ready to be consumed, whether gzip encoding is being used or not.
 java.lang.String getTargetUrl()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultHTTPProtocol.HTTPClientResponse

public DefaultHTTPProtocol.HTTPClientResponse(org.apache.commons.httpclient.HttpMethodBase method)
Method Detail

getResponseStream

public java.io.InputStream getResponseStream()
                                      throws java.io.IOException
Description copied from interface: HTTPResponse
Returns the stream to the response contents ready to be consumed, whether gzip encoding is being used or not.

Specified by:
getResponseStream in interface HTTPResponse
Throws:
java.io.IOException - the plain stream to the response contents
See Also:
HTTPResponse.getResponseStream()

getContentType

public java.lang.String getContentType()
Description copied from interface: HTTPResponse
Shortcut method to get the response content-type header

Specified by:
getContentType in interface HTTPResponse

getResponseCharset

public java.lang.String getResponseCharset()
Description copied from interface: HTTPResponse
Returns the response charset identifier as extracted from the HTTP header, if any.

Specified by:
getResponseCharset in interface HTTPResponse
Returns:
the charset or null if not indicated by the server.

getResponseHeader

public java.lang.String getResponseHeader(java.lang.String headerName)
Description copied from interface: HTTPResponse
Returns the value of the given HTTP response header.

Specified by:
getResponseHeader in interface HTTPResponse
Parameters:
headerName - the response header name to get the value of
Returns:
the value the HTTP server set for the given response header name, may be null
See Also:
HTTPResponse#getResponseHeader()

getTargetUrl

public java.lang.String getTargetUrl()
Specified by:
getTargetUrl in interface HTTPResponse
Returns:
the URL the request producing this response was sent to
See Also:
HTTPResponse.getTargetUrl()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.