Method Summary |
|
final static WebResponse | createBlankResponse() |
final protected void | defineRawInputStream(InputStream inputStream) |
public WebApplet[] | getApplets() |
public String | getCharacterSet() Returns the character set used in this response. |
public int | getContentLength() Returns the content length of this response. |
public String | getContentType() Returns the content type of this response. |
String | getCookieHeader() |
CookieJar | getCookieJar() |
public Document | getDOM() Returns a copy of the domain object model tree associated with this response. |
static String | getDefaultEncoding() |
public String[] | getElementNames() Returns a list of HTML element names contained in this HTML section. |
public HTMLElement | getElementWithID(String id) Returns the HTMLElement with the specified ID. |
public HTMLElement[] | getElementsWithAttribute(String name, String value) Returns the HTMLElements found with the specified attribute value. |
public HTMLElement[] | getElementsWithName(String name) Returns the HTMLElements found in this segment with the specified name. |
public String | getExternalStyleSheet() Returns the stylesheet linked in the head of the page. |
public WebForm | getFirstMatchingForm(HTMLElementPredicate predicate, Object criteria) Returns the first form found in the page matching the specified criteria. |
public WebLink | getFirstMatchingLink(HTMLElementPredicate predicate, Object criteria) Returns the first link found in the page matching the specified criteria. |
public WebTable | getFirstMatchingTable(HTMLElementPredicate predicate, Object criteria) Returns the first table in the response which matches the specified predicate and value. |
public TextBlock | getFirstMatchingTextBlock(HTMLElementPredicate predicate, Object criteria) Returns the first link found in the page matching the specified criteria. |
public WebForm | getFormWithID(String ID) Returns the form found in the page with the specified ID. |
public WebForm | getFormWithName(String name) Returns the form found in the page with the specified name. |
public WebForm[] | getForms() Returns the forms found in the page in the order in which they appear. |
FrameSelector | getFrame() Returns the frame containing this page. |
public String | getFrameName() Returns the name of the frame containing this page. |
public String[] | getFrameNames() Returns the names of the frames found in the page in the order in which they appear. |
WebRequest[] | getFrameRequests() Returns the frames found in the page in the order in which they appear. |
FrameSelector[] | getFrameSelectors() Returns the frames found in the page in the order in which they appear. |
abstract public String | getHeaderField(String fieldName) Returns the value for the specified header field. |
abstract public String[] | getHeaderFieldNames() Returns the names of the header fields found in the response. |
public WebImage | getImageWithAltText(String altText) Returns the first image found in the page with the specified alt attribute. |
public WebImage | getImageWithName(String source) Returns the image found in the page with the specified name attribute. |
public WebImage | getImageWithSource(String source) Returns the first image found in the page with the specified src attribute. |
public WebImage[] | getImages() Returns the images found in the page in the order in which they appear. |
public InputStream | getInputStream() Returns a buffered input stream for reading the contents of this reply. |
public WebLink | getLinkWith(String text) Returns the first link which contains the specified text. |
public WebLink | getLinkWithID(String ID) Returns the link found in the page with the specified ID. |
public WebLink | getLinkWithImageText(String text) Returns the first link which contains an image with the specified text as its 'alt' attribute. |
public WebLink | getLinkWithName(String name) Returns the link found in the page with the specified name. |
public WebLink[] | getLinks() Returns the links found in the page in the order in which they appear. |
public WebForm[] | getMatchingForms(HTMLElementPredicate predicate, Object criteria) Returns all forms found in the page matching the specified criteria. |
public WebLink[] | getMatchingLinks(HTMLElementPredicate predicate, Object criteria) Returns all links found in the page matching the specified criteria. |
public WebTable[] | getMatchingTables(HTMLElementPredicate predicate, Object criteria) Returns all tables found in the page matching the specified criteria. |
public String[] | getMetaTagContent(String attribute, String attributeValue) Retrieves the "content" of the meta tags for a key pair attribute-attributeValue. |
public String[] | getNewCookieNames() Returns a list of new cookie names defined as part of this response. |
public String | getNewCookieValue(String name) Returns the new cookie value defined as part of this response. |
public TextBlock | getNextTextBlock(TextBlock block) Returns the text block after the specified block, if any. |
HTMLPage | getReceivedPage() |
String | getReferer() |
public int | getRefreshDelay() Returns the delay before normally following the request to refresh this page, if any.
This request will be defined by a tag in the header. |
public WebRequest | getRefreshRequest() Returns a request to refresh this page, if any. |
abstract public int | getResponseCode() Returns the response code associated with this response. |
abstract public String | getResponseMessage() Returns the response message associated with this response. |
public Scriptable | getScriptableObject() |
public WebResponse | getSubframeContents(String subFrameName) Returns the contents of the specified subframe of this frameset response. |
public WebTable | getTableStartingWith(String text) Returns the first table in the response which has the specified text as the full text of
its first non-blank row and non-blank column. |
public WebTable | getTableStartingWithPrefix(String text) Returns the first table in the response which has the specified text as a prefix of the text of
its first non-blank row and non-blank column. |
public WebTable | getTableWithID(String text) Returns the first table in the response which has the specified text as its ID attribute.
Will recurse into any nested tables, as needed.
Case is ignored.
exception: SAXException - thrown if there is an error parsing the response. |
public WebTable | getTableWithSummary(String text) Returns the first table in the response which has the specified text as its summary attribute.
Will recurse into any nested tables, as needed.
Case is ignored.
exception: SAXException - thrown if there is an error parsing the response. |
public WebTable[] | getTables() Returns the top-level tables found in this page in the order in which
they appear. |
public String | getText() Returns the text of the response (excluding headers) as a string. |
public TextBlock[] | getTextBlocks() Returns an array of text blocks found in the page. |
public String | getTitle() Returns the title of the page. |
public URL | getURL() Returns the URL which invoked this response. |
WebWindow | getWindow() |
public boolean | isHTML() Returns true if the response is HTML. |
protected void | loadResponseText() |
public static ScriptableDelegate | newDelegate(String delegateClassName) |
public static WebResponse | newResponse(URLConnection connection) Returns a web response built from a URL connection. |
boolean | replaceText(String text, String contentType) |
protected void | setContentTypeHeader(String value) Overwrites the current value (if any) of the content type header. |
void | setCookie(String name, String value) |
void | setFrame(FrameSelector frame) |
void | setWindow(WebWindow window) |
abstract public String | toString() |