/** The collected URLs. */
private final List<Page> collectedPages = new ArrayList<Page>();
+ /** The title of the URL. */
+ private String title;
+
/**
* Creates a new fetcher for the given URL.
*
//
/**
+ * Returns the title of the fetched URL.
+ *
+ * @return The fetched URL’s title
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
* Returns the pages collected while parsing this URL.
*
* @return The collected pages
* {@inheritDoc}
*/
public void parsedTitle(InputStream inputStream, String title) {
+ this.title = title;
}
}