## com.gargoylesoftware.htmlunit
Class StringWebResponse

    java.lang.Object
      com.gargoylesoftware.htmlunit.WebResponseImpl
          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: 4460 $
Author:
  Mike Bowler, Marc Guillemot, Brad Clarke, Ahmed Ashour
See Also:
  Serialized Form

Constructor Summary
`StringWebResponse(java.lang.String content, java.lang.String charset, java.net.URL originatingURL)` Creates an instance associated with the specified originating URL.
`StringWebResponse(java.lang.String content, java.net.URL originatingURL)` Creates an instance associated with the specified originating URL.

Method Summary

Methods inherited from class com.gargoylesoftware.htmlunit.WebResponseImpl
`getContentAsBytes, getContentAsStream, getContentAsString, getContentAsString, getContentCharset, getContentCharSet, getContentCharsetOrNull, getContentType, getLoadTime, getRequestMethod, getRequestSettings, getRequestUrl, getResponseHeaders, getResponseHeaderValue, getStatusCode, getStatusMessage, getUrl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringWebResponse

    public StringWebResponse(java.lang.String content,
                             java.net.URL originatingURL)

  Creates an instance associated with the specified originating URL.

  Parameters:
    `content` - the content to return
    `originatingURL` - the URL that this should be associated with

### StringWebResponse

    public StringWebResponse(java.lang.String content,
                             java.lang.String charset,
                             java.net.URL originatingURL)

  Creates an instance associated with the specified 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

Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.