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

java.lang.Object
  extended by org.geotools.data.wfs.protocol.wfs.WFSResponse

public class WFSResponse
extends java.lang.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
Version:
$Id: WFSResponse.java 31888 2008-11-20 13:34:53Z groldan $
Author:
Gabriel Roldan (OpenGeo)

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

Constructor Detail

WFSResponse

public WFSResponse(java.lang.String targetUrl,
                   org.eclipse.emf.ecore.EObject originatingRequest,
                   java.nio.charset.Charset charset,
                   java.lang.String contentType,
                   java.io.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 java.nio.charset.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 java.lang.String getContentType()
Returns the WFS response declared content type

Returns:
the content type of the response

getInputStream

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

Returns:
the input stream for the response

setInputStream

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

Parameters:
in -

getOriginatingRequest

public org.eclipse.emf.ecore.EObject getOriginatingRequest()

getTargetUrl

public java.lang.String getTargetUrl()

toString

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


Copyright © 1996-2010 Geotools. All Rights Reserved.