sebb 2004/02/09 02:59:27
Modified: src/protocol/http/org/apache/jmeter/protocol/http/parser
HTMLParser.java
Log:
Add back original method signature (using a Collection)
Revision Changes Path
1.20 +29 -3
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java
Index: HTMLParser.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParser.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- HTMLParser.java 8 Feb 2004 23:52:37 -0000 1.19
+++ HTMLParser.java 9 Feb 2004 10:59:26 -0000 1.20
@@ -225,9 +225,13 @@
* return the corresponding RL String. Overall problems parsing the html
* should be reported by throwing an HTMLParseException.
*
+ * N.B.
+ * The Iterator returns URLs, but the Collection will contain
+ * objects of class URLString.
+ *
* @param html HTML code
* @param baseUrl Base URL from which the HTML code was obtained
- * @param coll Collection
+ * @param coll URLCollection
* @return an Iterator for the resource URLs
*/
public abstract Iterator getEmbeddedResourceURLs(byte[] html, URL baseUrl,
@@ -235,6 +239,28 @@
throws HTMLParseException;
+ /**
+ * Get the URLs for all the resources that a browser would automatically
+ * download following the download of the HTML content, that is: images,
+ * stylesheets, javascript files, applets, etc...
+ *
+ * N.B.
+ * The Iterator returns URLs, but the Collection will contain
+ * objects of class URLString.
+ *
+ * @param html HTML code
+ * @param baseUrl Base URL from which the HTML code was obtained
+ * @param coll Collection - will contain URLString objects, not URLs
+ * @return an Iterator for the resource URLs
+ */
+ public Iterator getEmbeddedResourceURLs(byte[] html, URL baseUrl,
+
Collection coll)
+ throws HTMLParseException
+ {
+ return getEmbeddedResourceURLs(html,baseUrl, new
URLCollection(coll));
+ }
+
+
/**
* Parsers should over-ride this method if the parser class is re-usable,
* in which case the class will be cached for the next getParser() call.
@@ -448,7 +474,7 @@
if (c == null) {
result = p.getEmbeddedResourceURLs(buffer,new
URL(url));
} else {
- result = p.getEmbeddedResourceURLs(buffer,new URL(url),new
URLCollection(c));
+ result = p.getEmbeddedResourceURLs(buffer,new URL(url),c);
}
/*
* TODO:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]