Package org.htmlunit

Class TextPage

All Implemented Interfaces:
Serializable, Page

public class TextPage extends AbstractPage
A generic page that will be returned for any text related content. Specifically any content types that start with text/
See Also:
  • Constructor Details

    • TextPage

      public TextPage(WebResponse webResponse, WebWindow enclosingWindow)
      Creates an instance.
      Parameters:
      webResponse - the response from the server
      enclosingWindow - the window that holds the page
  • Method Details

    • getContent

      public String getContent()
      Returns the content of this page.
      Returns:
      the content of this page
    • save

      public void save(File file) throws IOException
      Saves the content of this page to a text file.
      Parameters:
      file - file to write this page into
      Throws:
      IOException - If an error occurs