JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit

Class StringWebResponse

  • All Implemented Interfaces:
    Serializable


    public class StringWebResponse
    extends WebResponse 
    A simple WebResponse created from a string. Content is assumed to be of type text/html.
    Author:
    Mike Bowler, Marc Guillemot, Brad Clarke, Ahmed Ashour, Ronald Brill, Carsten Steul
    See Also:
    Serialized Form
    • Constructor Detail

      • StringWebResponse

        public StringWebResponse(String content,
         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(String content,
         Charset charset,
         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
    • Method Detail

      • isFromJavascript

        public boolean isFromJavascript()
        Returns the fromJavascript property. This is true, if the response was created from javascript (usually document.write).
        Returns:
        the from fromJavascript_
      • setFromJavascript

        public void setFromJavascript(boolean fromJavascript)
        Sets the fromJavascript_ property. Set this to true, if the response was created from javascript (usually document.write).
        Parameters:
        fromJavascript - the new fromJavascript
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /