|
|||||||||
| Home >> All >> com >> meterware >> [ httpunit overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.meterware.httpunit
Class WebResponse

java.lang.Objectcom.meterware.httpunit.WebResponse
- All Implemented Interfaces:
- com.meterware.httpunit.cookies.CookieSource, HTMLSegment
- Direct Known Subclasses:
- DefaultWebResponse, HttpWebResponse
- public abstract class WebResponse
- extends java.lang.Object
- implements HTMLSegment, com.meterware.httpunit.cookies.CookieSource
- extends java.lang.Object
A response to a web request from a web server.
| Nested Class Summary | |
(package private) static class |
WebResponse.ByteTag
|
(package private) static class |
WebResponse.ByteTagParser
|
class |
WebResponse.Scriptable
|
| Constructor Summary | |
protected |
WebResponse(WebClient client,
FrameSelector frame,
java.net.URL url)
Constructs a response object. |
protected |
WebResponse(WebClient client,
FrameSelector frame,
java.net.URL url,
java.lang.String text)
Constructs a response object. |
| Method Summary | |
(package private) static WebResponse |
createBlankResponse()
|
protected void |
defineRawInputStream(java.io.InputStream inputStream)
|
private boolean |
encodedUsingGZIP()
|
WebApplet[] |
getApplets()
Returns the applets found in the page in the order in which they appear. |
private int |
getAvailableBytes(java.io.InputStream inputStream)
|
java.lang.String |
getCharacterSet()
Returns the character set used in this response. |
int |
getContentLength()
Returns the content length of this response. |
java.lang.String |
getContentType()
Returns the content type of this response. |
(package private) java.lang.String |
getCookieHeader()
|
(package private) com.meterware.httpunit.cookies.CookieJar |
getCookieJar()
|
(package private) static java.lang.String |
getDefaultEncoding()
|
org.w3c.dom.Document |
getDOM()
Returns a copy of the domain object model tree associated with this response. |
java.lang.String[] |
getElementNames()
Returns a list of HTML element names contained in this HTML section. |
HTMLElement[] |
getElementsWithAttribute(java.lang.String name,
java.lang.String value)
Returns the HTMLElements found with the specified attribute value. |
HTMLElement[] |
getElementsWithName(java.lang.String name)
Returns the HTMLElements found in this segment with the specified name. |
HTMLElement |
getElementWithID(java.lang.String id)
Returns the HTMLElement with the specified ID. |
java.lang.String |
getExternalStyleSheet()
Returns the stylesheet linked in the head of the page. |
WebForm |
getFirstMatchingForm(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns the first form found in the page matching the specified criteria. |
WebLink |
getFirstMatchingLink(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns the first link found in the page matching the specified criteria. |
WebTable |
getFirstMatchingTable(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns the first table in the response which matches the specified predicate and value. |
TextBlock |
getFirstMatchingTextBlock(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns the first link found in the page matching the specified criteria. |
WebForm[] |
getForms()
Returns the forms found in the page in the order in which they appear. |
WebForm |
getFormWithID(java.lang.String ID)
Returns the form found in the page with the specified ID. |
WebForm |
getFormWithName(java.lang.String name)
Returns the form found in the page with the specified name. |
(package private) FrameSelector |
getFrame()
Returns the frame containing this page. |
java.lang.String |
getFrameName()
Returns the name of the frame containing this page. |
java.lang.String[] |
getFrameNames()
Returns the names of the frames found in the page in the order in which they appear. |
(package private) WebRequest[] |
getFrameRequests()
Returns the frames found in the page in the order in which they appear. |
private WebFrame[] |
getFrames()
|
(package private) FrameSelector[] |
getFrameSelectors()
Returns the frames found in the page in the order in which they appear. |
abstract java.lang.String |
getHeaderField(java.lang.String fieldName)
Returns the value for the specified header field. |
abstract java.lang.String[] |
getHeaderFieldNames()
Returns the names of the header fields found in the response. |
WebImage[] |
getImages()
Returns the images found in the page in the order in which they appear. |
WebImage |
getImageWithAltText(java.lang.String altText)
Returns the first image found in the page with the specified alt attribute. |
WebImage |
getImageWithName(java.lang.String source)
Returns the image found in the page with the specified name attribute. |
WebImage |
getImageWithSource(java.lang.String source)
Returns the first image found in the page with the specified src attribute. |
java.io.InputStream |
getInputStream()
Returns a buffered input stream for reading the contents of this reply. |
WebLink[] |
getLinks()
Returns the links found in the page in the order in which they appear. |
WebLink |
getLinkWith(java.lang.String text)
Returns the first link which contains the specified text. |
WebLink |
getLinkWithID(java.lang.String ID)
Returns the link found in the page with the specified ID. |
WebLink |
getLinkWithImageText(java.lang.String text)
Returns the first link which contains an image with the specified text as its 'alt' attribute. |
WebLink |
getLinkWithName(java.lang.String name)
Returns the link found in the page with the specified name. |
WebForm[] |
getMatchingForms(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns all forms found in the page matching the specified criteria. |
WebLink[] |
getMatchingLinks(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns all links found in the page matching the specified criteria. |
WebTable[] |
getMatchingTables(HTMLElementPredicate predicate,
java.lang.Object criteria)
Returns all tables found in the page matching the specified criteria. |
java.lang.String[] |
getMetaTagContent(java.lang.String attribute,
java.lang.String attributeValue)
Retrieves the "content" of the meta tags for a key pair attribute-attributeValue. |
java.lang.String[] |
getNewCookieNames()
Returns a list of new cookie names defined as part of this response. |
java.lang.String |
getNewCookieValue(java.lang.String name)
Returns the new cookie value defined as part of this response. |
TextBlock |
getNextTextBlock(TextBlock block)
Returns the text block after the specified block, if any. |
(package private) HTMLPage |
getReceivedPage()
|
(package private) java.lang.String |
getReferer()
|
int |
getRefreshDelay()
Returns the delay before normally following the request to refresh this page, if any. |
WebRequest |
getRefreshRequest()
Returns a request to refresh this page, if any. |
private java.lang.String |
getRefreshURL(java.lang.String text)
|
abstract int |
getResponseCode()
Returns the response code associated with this response. |
abstract java.lang.String |
getResponseMessage()
Returns the response message associated with this response. |
WebResponse.Scriptable |
getScriptableObject()
|
WebResponse |
getSubframeContents(java.lang.String subFrameName)
Returns the contents of the specified subframe of this frameset response. |
WebTable[] |
getTables()
Returns the top-level tables found in this page in the order in which they appear. |
WebTable |
getTableStartingWith(java.lang.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. |
WebTable |
getTableStartingWithPrefix(java.lang.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. |
WebTable |
getTableWithID(java.lang.String text)
Returns the first table in the response which has the specified text as its ID attribute. |
WebTable |
getTableWithSummary(java.lang.String text)
Returns the first table in the response which has the specified text as its summary attribute. |
java.lang.String |
getText()
Returns the text of the response (excluding headers) as a string. |
TextBlock[] |
getTextBlocks()
Returns an array of text blocks found in the page. |
java.lang.String |
getTitle()
Returns the title of the page. |
java.net.URL |
getURL()
Returns the URL which invoked this response. |
(package private) WebWindow |
getWindow()
|
(package private) boolean |
hasSubframes()
|
private void |
inferContentType(java.lang.String contentTypeHeader)
|
private void |
inferRefreshHeader(java.lang.String refreshHeader)
|
private void |
interpretRefreshHeaderElement(java.lang.String token,
java.lang.String refreshHeader)
|
boolean |
isHTML()
Returns true if the response is HTML. |
private boolean |
isHttpEquivMetaTag(WebResponse.ByteTag tag,
java.lang.String headerName)
|
protected void |
loadResponseText()
|
static com.meterware.httpunit.scripting.ScriptableDelegate |
newDelegate(java.lang.String delegateClassName)
|
static WebResponse |
newResponse(java.net.URLConnection connection)
Returns a web response built from a URL connection. |
private void |
processBaseTag(WebResponse.ByteTag tag)
|
private void |
processMetaTag(WebResponse.ByteTag tag)
|
private void |
readContentTypeHeader()
|
private byte[] |
readFromStream(java.io.InputStream inputStream,
int maxBytes)
|
private byte[] |
readFromStream1(java.io.InputStream inputStream,
int maxBytes)
|
private void |
readRefreshRequest()
|
private void |
readTags(byte[] rawMessage)
|
(package private) boolean |
replaceText(java.lang.String text,
java.lang.String contentType)
|
private void |
setCharacterSet(java.lang.String characterSet)
|
protected void |
setContentTypeHeader(java.lang.String value)
Overwrites the current value (if any) of the content type header. |
(package private) void |
setCookie(java.lang.String name,
java.lang.String value)
|
(package private) void |
setFrame(FrameSelector frame)
|
(package private) void |
setWindow(WebWindow window)
|
abstract java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.meterware.httpunit.cookies.CookieSource |
getHeaderFields |
| Field Detail |
HTML_CONTENT
private static final java.lang.String HTML_CONTENT
- See Also:
- Constant Field Values
XHTML_CONTENT
private static final java.lang.String XHTML_CONTENT
- See Also:
- Constant Field Values
FAUX_XHTML_CONTENT
private static final java.lang.String FAUX_XHTML_CONTENT
- See Also:
- Constant Field Values
UNINITIALIZED_INT
private static final int UNINITIALIZED_INT
- See Also:
- Constant Field Values
UNKNOWN_LENGTH_TIMEOUT
private static final int UNKNOWN_LENGTH_TIMEOUT
- See Also:
- Constant Field Values
UNKNOWN_LENGTH_RETRY_INTERVAL
private static final int UNKNOWN_LENGTH_RETRY_INTERVAL
- See Also:
- Constant Field Values
_frame
private FrameSelector _frame
_baseTarget
private java.lang.String _baseTarget
_refreshHeader
private java.lang.String _refreshHeader
_hasSubframes
private boolean _hasSubframes
_baseURL
private java.net.URL _baseURL
_parsingPage
private boolean _parsingPage
BLANK_HTML
static final java.lang.String BLANK_HTML
- See Also:
- Constant Field Values
_window
private WebWindow _window
_page
private HTMLPage _page
_contentHeader
private java.lang.String _contentHeader
_contentLength
private int _contentLength
_contentType
private java.lang.String _contentType
_characterSet
private java.lang.String _characterSet
_refreshRequest
private WebRequest _refreshRequest
_refreshDelay
private int _refreshDelay
_responseText
private java.lang.String _responseText
_inputStream
private java.io.InputStream _inputStream
_pageURL
private final java.net.URL _pageURL
_client
private final WebClient _client
_scriptable
private WebResponse.Scriptable _scriptable
_cookies
private com.meterware.httpunit.cookies.CookieJar _cookies
_defaultEncoding
private static java.lang.String _defaultEncoding
DEFAULT_ENCODING_CANDIDATES
private static final java.lang.String[] DEFAULT_ENCODING_CANDIDATES
| Constructor Detail |
WebResponse
protected WebResponse(WebClient client, FrameSelector frame, java.net.URL url)
- Constructs a response object.
WebResponse
protected WebResponse(WebClient client, FrameSelector frame, java.net.URL url, java.lang.String text)
- Constructs a response object.
| Method Detail |
newResponse
public static WebResponse newResponse(java.net.URLConnection connection) throws java.io.IOException
- Returns a web response built from a URL connection. Provided to allow
access to WebResponse parsing without using a WebClient.
isHTML
public boolean isHTML()
- Returns true if the response is HTML.
getURL
public java.net.URL getURL()
- Returns the URL which invoked this response.
- Specified by:
getURLin interfacecom.meterware.httpunit.cookies.CookieSource
getTitle
public java.lang.String getTitle() throws org.xml.sax.SAXException
- Returns the title of the page.
getExternalStyleSheet
public java.lang.String getExternalStyleSheet() throws org.xml.sax.SAXException
- Returns the stylesheet linked in the head of the page.
will return "/mystyle.css".
getMetaTagContent
public java.lang.String[] getMetaTagContent(java.lang.String attribute, java.lang.String attributeValue) throws org.xml.sax.SAXException
- Retrieves the "content" of the meta tags for a key pair attribute-attributeValue.
this can be used like thisgetMetaTagContent("name","robots") will return { "index","follow" } getMetaTagContent("http-equiv","Expires") will return { "now" }
getFrameName
public java.lang.String getFrameName()
- Returns the name of the frame containing this page.
setFrame
void setFrame(FrameSelector frame)
getFrame
FrameSelector getFrame()
- Returns the frame containing this page.
getRefreshRequest
public WebRequest getRefreshRequest()
- Returns a request to refresh this page, if any. This request will be defined
by a tag in the header. If no tag exists, will return null.
getRefreshDelay
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. If no tag exists,
will return zero.
getResponseCode
public abstract int getResponseCode()
- Returns the response code associated with this response.
getResponseMessage
public abstract java.lang.String getResponseMessage()
- Returns the response message associated with this response.
getContentLength
public int getContentLength()
- Returns the content length of this response.
getContentType
public java.lang.String getContentType()
- Returns the content type of this response.
getCharacterSet
public java.lang.String getCharacterSet()
- Returns the character set used in this response.
getNewCookieNames
public java.lang.String[] getNewCookieNames()
- Returns a list of new cookie names defined as part of this response.
getNewCookieValue
public java.lang.String getNewCookieValue(java.lang.String name)
- Returns the new cookie value defined as part of this response.
getHeaderFieldNames
public abstract java.lang.String[] getHeaderFieldNames()
- Returns the names of the header fields found in the response.
getHeaderField
public abstract java.lang.String getHeaderField(java.lang.String fieldName)
- Returns the value for the specified header field. If no such field is defined, will return null.
If more than one header is defined for the specified name, returns only the first found.
getText
public java.lang.String getText() throws java.io.IOException
- Returns the text of the response (excluding headers) as a string. Use this method in preference to 'toString'
which may be used to represent internal state of this object.
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Returns a buffered input stream for reading the contents of this reply.
getFrameNames
public java.lang.String[] getFrameNames() throws org.xml.sax.SAXException
- Returns the names of the frames found in the page in the order in which they appear.
getFrameSelectors
FrameSelector[] getFrameSelectors() throws org.xml.sax.SAXException
- Returns the frames found in the page in the order in which they appear.
getSubframeContents
public WebResponse getSubframeContents(java.lang.String subFrameName)
- Returns the contents of the specified subframe of this frameset response.
getElementWithID
public HTMLElement getElementWithID(java.lang.String id) throws org.xml.sax.SAXException
- Returns the HTMLElement with the specified ID.
- Specified by:
getElementWithIDin interfaceHTMLSegment
getElementNames
public java.lang.String[] getElementNames() throws org.xml.sax.SAXException
- Returns a list of HTML element names contained in this HTML section.
- Specified by:
getElementNamesin interfaceHTMLSegment
getElementsWithName
public HTMLElement[] getElementsWithName(java.lang.String name) throws org.xml.sax.SAXException
- Returns the HTMLElements found in this segment with the specified name.
- Specified by:
getElementsWithNamein interfaceHTMLSegment
getElementsWithAttribute
public HTMLElement[] getElementsWithAttribute(java.lang.String name, java.lang.String value) throws org.xml.sax.SAXException
- Returns the HTMLElements found with the specified attribute value.
- Specified by:
getElementsWithAttributein interfaceHTMLSegment
- Since:
- 1.6
getForms
public WebForm[] getForms() throws org.xml.sax.SAXException
- Returns the forms found in the page in the order in which they appear.
- Specified by:
getFormsin interfaceHTMLSegment
getFormWithName
public WebForm getFormWithName(java.lang.String name) throws org.xml.sax.SAXException
- Returns the form found in the page with the specified name.
- Specified by:
getFormWithNamein interfaceHTMLSegment
getFormWithID
public WebForm getFormWithID(java.lang.String ID) throws org.xml.sax.SAXException
- Returns the form found in the page with the specified ID.
- Specified by:
getFormWithIDin interfaceHTMLSegment
getFirstMatchingForm
public WebForm getFirstMatchingForm(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns the first form found in the page matching the specified criteria.
- Specified by:
getFirstMatchingFormin interfaceHTMLSegment
getMatchingForms
public WebForm[] getMatchingForms(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns all forms found in the page matching the specified criteria.
- Specified by:
getMatchingFormsin interfaceHTMLSegment
getLinks
public WebLink[] getLinks() throws org.xml.sax.SAXException
- Returns the links found in the page in the order in which they appear.
- Specified by:
getLinksin interfaceHTMLSegment
getLinkWith
public WebLink getLinkWith(java.lang.String text) throws org.xml.sax.SAXException
- Returns the first link which contains the specified text.
- Specified by:
getLinkWithin interfaceHTMLSegment
getLinkWithImageText
public WebLink getLinkWithImageText(java.lang.String text) throws org.xml.sax.SAXException
- Returns the first link which contains an image with the specified text as its 'alt' attribute.
- Specified by:
getLinkWithImageTextin interfaceHTMLSegment
getLinkWithName
public WebLink getLinkWithName(java.lang.String name) throws org.xml.sax.SAXException
- Returns the link found in the page with the specified name.
getLinkWithID
public WebLink getLinkWithID(java.lang.String ID) throws org.xml.sax.SAXException
- Returns the link found in the page with the specified ID.
getFirstMatchingLink
public WebLink getFirstMatchingLink(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns the first link found in the page matching the specified criteria.
- Specified by:
getFirstMatchingLinkin interfaceHTMLSegment
getMatchingLinks
public WebLink[] getMatchingLinks(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns all links found in the page matching the specified criteria.
- Specified by:
getMatchingLinksin interfaceHTMLSegment
getImages
public WebImage[] getImages() throws org.xml.sax.SAXException
- Returns the images found in the page in the order in which they appear.
- Specified by:
getImagesin interfaceHTMLSegment
getImageWithName
public WebImage getImageWithName(java.lang.String source) throws org.xml.sax.SAXException
- Returns the image found in the page with the specified name attribute.
- Specified by:
getImageWithNamein interfaceHTMLSegment
getImageWithSource
public WebImage getImageWithSource(java.lang.String source) throws org.xml.sax.SAXException
- Returns the first image found in the page with the specified src attribute.
- Specified by:
getImageWithSourcein interfaceHTMLSegment
getImageWithAltText
public WebImage getImageWithAltText(java.lang.String altText) throws org.xml.sax.SAXException
- Returns the first image found in the page with the specified alt attribute.
- Specified by:
getImageWithAltTextin interfaceHTMLSegment
getApplets
public WebApplet[] getApplets() throws org.xml.sax.SAXException
- Description copied from interface:
HTMLSegment - Returns the applets found in the page in the order in which they appear.
- Specified by:
getAppletsin interfaceHTMLSegment
getTextBlocks
public TextBlock[] getTextBlocks() throws org.xml.sax.SAXException
- Returns an array of text blocks found in the page.
- Specified by:
getTextBlocksin interfaceHTMLSegment
- Since:
- 1.6
getNextTextBlock
public TextBlock getNextTextBlock(TextBlock block) throws org.xml.sax.SAXException
- Returns the text block after the specified block, if any.
- Since:
- 1.6
getFirstMatchingTextBlock
public TextBlock getFirstMatchingTextBlock(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns the first link found in the page matching the specified criteria.
- Since:
- 1.6
getDOM
public org.w3c.dom.Document getDOM() throws org.xml.sax.SAXException
- Returns a copy of the domain object model tree associated with this response.
If the response is HTML, it will use a special parser which can transform HTML into an XML DOM.
getTables
public WebTable[] getTables() throws org.xml.sax.SAXException
- Returns the top-level tables found in this page in the order in which
they appear.
- Specified by:
getTablesin interfaceHTMLSegment
getFirstMatchingTable
public WebTable getFirstMatchingTable(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns the first table in the response which matches the specified predicate and value.
Will recurse into any nested tables, as needed.
- Specified by:
getFirstMatchingTablein interfaceHTMLSegment
getMatchingTables
public WebTable[] getMatchingTables(HTMLElementPredicate predicate, java.lang.Object criteria) throws org.xml.sax.SAXException
- Returns all tables found in the page matching the specified criteria.
- Specified by:
getMatchingTablesin interfaceHTMLSegment
getTableStartingWith
public WebTable getTableStartingWith(java.lang.String text) throws org.xml.sax.SAXException
- 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. Will recurse into any nested tables, as needed.
Case is ignored.
- Specified by:
getTableStartingWithin interfaceHTMLSegment
getTableStartingWithPrefix
public WebTable getTableStartingWithPrefix(java.lang.String text) throws org.xml.sax.SAXException
- 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. Will recurse into any nested tables, as needed.
Case is ignored.
- Specified by:
getTableStartingWithPrefixin interfaceHTMLSegment
getTableWithSummary
public WebTable getTableWithSummary(java.lang.String text) throws org.xml.sax.SAXException
- 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.
- Specified by:
getTableWithSummaryin interfaceHTMLSegment
getTableWithID
public WebTable getTableWithID(java.lang.String text) throws org.xml.sax.SAXException
- 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.
- Specified by:
getTableWithIDin interfaceHTMLSegment
getScriptableObject
public WebResponse.Scriptable getScriptableObject()
newDelegate
public static com.meterware.httpunit.scripting.ScriptableDelegate newDelegate(java.lang.String delegateClassName)
toString
public abstract java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
defineRawInputStream
protected final void defineRawInputStream(java.io.InputStream inputStream) throws java.io.IOException
encodedUsingGZIP
private boolean encodedUsingGZIP()
setContentTypeHeader
protected void setContentTypeHeader(java.lang.String value)
- Overwrites the current value (if any) of the content type header.
createBlankResponse
static final WebResponse createBlankResponse()
getWindow
WebWindow getWindow()
setWindow
void setWindow(WebWindow window)
replaceText
boolean replaceText(java.lang.String text, java.lang.String contentType)
getFrameRequests
WebRequest[] getFrameRequests() throws org.xml.sax.SAXException
- Returns the frames found in the page in the order in which they appear.
loadResponseText
protected void loadResponseText()
throws java.io.IOException
readFromStream1
private byte[] readFromStream1(java.io.InputStream inputStream, int maxBytes) throws java.io.IOException
readFromStream
private byte[] readFromStream(java.io.InputStream inputStream, int maxBytes) throws java.io.IOException
getAvailableBytes
private int getAvailableBytes(java.io.InputStream inputStream) throws java.io.IOException
readTags
private void readTags(byte[] rawMessage)
throws java.io.UnsupportedEncodingException,
java.net.MalformedURLException
processBaseTag
private void processBaseTag(WebResponse.ByteTag tag) throws java.net.MalformedURLException
processMetaTag
private void processMetaTag(WebResponse.ByteTag tag)
isHttpEquivMetaTag
private boolean isHttpEquivMetaTag(WebResponse.ByteTag tag, java.lang.String headerName)
inferRefreshHeader
private void inferRefreshHeader(java.lang.String refreshHeader)
readRefreshRequest
private void readRefreshRequest()
interpretRefreshHeaderElement
private void interpretRefreshHeaderElement(java.lang.String token, java.lang.String refreshHeader)
getRefreshURL
private java.lang.String getRefreshURL(java.lang.String text)
inferContentType
private void inferContentType(java.lang.String contentTypeHeader)
getCookieJar
com.meterware.httpunit.cookies.CookieJar getCookieJar()
readContentTypeHeader
private void readContentTypeHeader()
getFrames
private WebFrame[] getFrames() throws org.xml.sax.SAXException
getReceivedPage
HTMLPage getReceivedPage() throws org.xml.sax.SAXException
getDefaultEncoding
static java.lang.String getDefaultEncoding()
setCharacterSet
private void setCharacterSet(java.lang.String characterSet)
hasSubframes
boolean hasSubframes()
setCookie
void setCookie(java.lang.String name, java.lang.String value)
getCookieHeader
java.lang.String getCookieHeader()
getReferer
java.lang.String getReferer()
JAVADOC
com.meterware.httpunit.WebResponse