Package org.htmlunit

# Class UnexpectedPage

java.lang.Object
org.htmlunit.AbstractPage
org.htmlunit.UnexpectedPage

All Implemented Interfaces:
  `Serializable`, `Page`

public class UnexpectedPage extends AbstractPage
A generic page that is returned whenever an unexpected content type is returned by the server.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UnexpectedPage(WebResponse webResponse, WebWindow enclosingWindow)`
  Creates an instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `getInputStream()`
  Returns an input stream representing all the content that was returned from the server.

  ### Methods inherited from class org.htmlunit.AbstractPage

  `cleanUp, getEnclosingWindow, getUrl, getWebResponse, initialize, isHtmlPage`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UnexpectedPage

    public UnexpectedPage(WebResponse webResponse, WebWindow enclosingWindow)
    Creates an instance.
    Parameters:
      `webResponse` - the response from the server that contains the data required to create this page
      `enclosingWindow` - the window that this page is being loaded into

- ## Method Details

  - ### getInputStream

    public InputStream getInputStream() throws IOException
    Returns an input stream representing all the content that was returned from the server.
    Returns:
      an input stream representing all the content that was returned from the server
    Throws:
      `IOException` - in case of IO problems