From 60ed0322361a6f8110e1c8191138039adaa0f6b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 10 Mar 2009 00:27:24 +0100 Subject: [PATCH] Remember title when parsing URL. --- src/net/pterodactylus/arachne/core/URLFetcher.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/net/pterodactylus/arachne/core/URLFetcher.java b/src/net/pterodactylus/arachne/core/URLFetcher.java index ddfbddd..d2ce831 100644 --- a/src/net/pterodactylus/arachne/core/URLFetcher.java +++ b/src/net/pterodactylus/arachne/core/URLFetcher.java @@ -40,6 +40,9 @@ class URLFetcher implements Runnable, ParserListener { /** The collected URLs. */ private final List collectedPages = new ArrayList(); + /** The title of the URL. */ + private String title; + /** * Creates a new fetcher for the given URL. * @@ -60,6 +63,15 @@ class URLFetcher implements Runnable, ParserListener { // /** + * 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 @@ -132,6 +144,7 @@ class URLFetcher implements Runnable, ParserListener { * {@inheritDoc} */ public void parsedTitle(InputStream inputStream, String title) { + this.title = title; } } -- 2.7.4