org.springframework.extensions.webscripts.connector
Class Response

java.lang.Object
  extended by org.springframework.extensions.webscripts.connector.Response

public class Response
extends Object

Representation of the response from a remote HTTP API call.

Author:
Kevin Roast

Method Summary
 String getEncoding()
          Gets the encoding.
 String getResponse()
          Gets the response.
 InputStream getResponseStream()
          Gets the response stream.
 ResponseStatus getStatus()
          Gets the status.
 String getText()
          Gets the text of the response.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getResponse

public String getResponse()
Gets the response.

Returns:
the data stream from the response object - will be null on error or if the response has already been streamed to an OutputStream.

getText

public String getText()
Gets the text of the response.

Returns:
the text

getResponseStream

public InputStream getResponseStream()
Gets the response stream.

Returns:
the response InputStream if set during construction, else will be null.

getStatus

public ResponseStatus getStatus()
Gets the status.

Returns:
Status object representing the response status and any error information

getEncoding

public String getEncoding()
Gets the encoding.

Returns:
the response encoding

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource, Inc. All Rights Reserved.