org.geotools.data.ows
Class Response

Object
  extended by Response
Direct Known Subclasses:
DescribeLayerResponse, GetCapabilitiesResponse, GetFeatureInfoResponse, GetLegendGraphicResponse, GetMapResponse, GetStylesResponse, PutStylesResponse

public abstract class Response
extends Object

Provides a base class for Responses from an OWS. Checks the incoming content for a ServiceException and parses it if it encounters one.

Author:
rgould
Module:
modules/library/main (gt-main.jar)

Field Summary
protected  String contentType
           
protected  InputStream inputStream
           
 
Constructor Summary
Response(String contentType, InputStream inputStream)
           
 
Method Summary
 String getContentType()
           
 InputStream getInputStream()
          Returns the InputStream that contains the response from the server.
protected  ServiceException parseException(InputStream inputStream)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

protected InputStream inputStream

contentType

protected String contentType
Constructor Detail

Response

public Response(String contentType,
                InputStream inputStream)
         throws ServiceException,
                IOException
Throws:
ServiceException
IOException
Method Detail

getContentType

public String getContentType()

getInputStream

public InputStream getInputStream()
Returns the InputStream that contains the response from the server. The contents of this stream vary according to the type of request that was made, and whether it was successful or not. NOTE: Note that clients using this code are responsible for closing the InputStream when they are finished with it.

Returns:
the input stream containing the response from the server

parseException

protected ServiceException parseException(InputStream inputStream)
                                   throws IOException
Throws:
IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.