org.geotools.data.wfs.protocol.wfs
Class WFSResponse

Object
  extended by WFSResponse

public class WFSResponse
extends Object

A handle to a WFS response that contains the input stream to the actual contents and some well known response information derived from the HTTP response headers.

Since:
2.6
Author:
Gabriel Roldan (OpenGeo)

Constructor Summary
WFSResponse(String targetUrl, EObject originatingRequest, Charset charset, String contentType, InputStream in)
           
 
Method Summary
 Charset getCharacterEncoding()
          Returns the character encoding if set by the server as an http header, if unknown assumes UTF-8
 String getContentType()
          Returns the WFS response declared content type
 InputStream getInputStream()
          The open input stream for the response contents
 EObject getOriginatingRequest()
           
 String getTargetUrl()
           
 void setInputStream(InputStream in)
          Allows to replace the input stream
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WFSResponse

public WFSResponse(String targetUrl,
                   EObject originatingRequest,
                   Charset charset,
                   String contentType,
                   InputStream in)
Parameters:
charset - the response charset, null if unknown, utf-8 will be assumed then
contentType - the response content type
in - the response input stream ready to be consumed
Method Detail

getCharacterEncoding

public Charset getCharacterEncoding()
Returns the character encoding if set by the server as an http header, if unknown assumes UTF-8

Returns:
the character set for the response if set, or null

getContentType

public String getContentType()
Returns the WFS response declared content type

Returns:
the content type of the response

getInputStream

public InputStream getInputStream()
The open input stream for the response contents

Returns:
the input stream for the response

setInputStream

public void setInputStream(InputStream in)
Allows to replace the input stream

Parameters:
in -

getOriginatingRequest

public EObject getOriginatingRequest()

getTargetUrl

public String getTargetUrl()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.