com.gargoylesoftware.htmlunit
Class StringWebResponse

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.WebResponseImpl
      extended by com.gargoylesoftware.htmlunit.StringWebResponse
All Implemented Interfaces:
WebResponse, java.io.Serializable

public class StringWebResponse
extends WebResponseImpl

A simple WebResponse created from a string. Content is assumed to be of type text/html.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, Marc Guillemot, Brad Clarke, Ahmed Ashour
See Also:
Serialized Form

Constructor Summary
StringWebResponse(java.lang.String content)
 Create an instance.
StringWebResponse(java.lang.String content, java.lang.String charset)
 Create an instance.
StringWebResponse(java.lang.String content, java.lang.String charset, java.net.URL originatingURL)
 Create an instance associated with an originating URL
StringWebResponse(java.lang.String content, java.net.URL originatingURL)
 Create an instance associated with an originating URL
 
Method Summary
 
Methods inherited from class com.gargoylesoftware.htmlunit.WebResponseImpl
getContentAsStream, getContentAsString, getContentCharSet, getContentType, getLoadTimeInMilliSeconds, getRequestMethod, getResponseBody, getResponseHeaders, getResponseHeaderValue, getStatusCode, getStatusMessage, getUrl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringWebResponse

public StringWebResponse(java.lang.String content)
Create an instance.

Parameters:
content - The content to return.

StringWebResponse

public StringWebResponse(java.lang.String content,
                         java.lang.String charset)
Create an instance.

Parameters:
content - The content to return.
charset - The charset used to convert the content.

StringWebResponse

public StringWebResponse(java.lang.String content,
                         java.lang.String charset,
                         java.net.URL originatingURL)
Create an instance associated with an originating URL

Parameters:
content - The content to return.
charset - The charset used to convert the content.
originatingURL - The url that this should be associated with

StringWebResponse

public StringWebResponse(java.lang.String content,
                         java.net.URL originatingURL)
Create an instance associated with an originating URL

Parameters:
content - The content to return.
originatingURL - The url that this should be associated with


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.