org.geotools.data.ows
Class SimpleHttpClient.SimpleHTTPResponse

Object
  extended by SimpleHttpClient.SimpleHTTPResponse
All Implemented Interfaces:
HTTPResponse
Enclosing class:
SimpleHttpClient

public static class SimpleHttpClient.SimpleHTTPResponse
extends Object
implements HTTPResponse


Constructor Summary
SimpleHttpClient.SimpleHTTPResponse(URLConnection connection)
           
 
Method Summary
 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 null 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.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleHttpClient.SimpleHTTPResponse

public SimpleHttpClient.SimpleHTTPResponse(URLConnection connection)
                                    throws IOException
Throws:
IOException
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 interface HTTPResponse
See Also:
HTTPResponse.dispose()

getContentType

public String getContentType()
Description copied from interface: HTTPResponse
Short cut for getResponseHeader("Content-Type")

Specified by:
getContentType in interface HTTPResponse
See Also:
HTTPResponse.getContentType()

getResponseHeader

public String getResponseHeader(String headerName)
Description copied from interface: HTTPResponse
Returns the value of the requested HTTP response header, or null if not set.

Specified by:
getResponseHeader in interface HTTPResponse

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 interface HTTPResponse
Throws:
IOException - if such happens when obtaining the response stream.
See Also:
HTTPResponse.getResponseStream()

getResponseCharset

public String getResponseCharset()
Specified by:
getResponseCharset in interface HTTPResponse
Returns:
the response charset parsed out of the content type response header, if any, or null otherwise.
See Also:
HTTPResponse.getResponseCharset()


Copyright © 1996-2014 Geotools. All Rights Reserved.