X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FDownloader.java;h=30ce4e798aff5300b30e14f200546b1e4d09ef16;hb=f28a134e4d06ee40d62c0c62123fc4799d49d8eb;hp=651abc3a65932fbc9cbd7355610eb1c2292db21f;hpb=f6e8d60dbb9f124046f1b951315d74f003624f09;p=fanfix.git diff --git a/src/be/nikiroo/utils/Downloader.java b/src/be/nikiroo/utils/Downloader.java index 651abc3..30ce4e7 100644 --- a/src/be/nikiroo/utils/Downloader.java +++ b/src/be/nikiroo/utils/Downloader.java @@ -88,6 +88,25 @@ public class Downloader { this.tracer = tracer; } + /** + * The {@link Cache} to use for all access (can be NULL). + * + * @return the cache + */ + public Cache getCache() { + return cache; + } + + /** + * The {@link Cache} to use for all access (can be NULL). + * + * @param cache + * the new cache + */ + public void setCache(Cache cache) { + this.cache = cache; + } + /** * Clear all the cookies currently in the jar. *
@@ -197,7 +216,13 @@ public class Downloader {
* @param url
* the {@link URL} to open
* @param originalUrl
- * the original {@link URL} before any redirection occurs
+ * the original {@link URL} before any redirection occurs, which
+ * is also used for the cache ID if needed (so we can retrieve
+ * the content with this URL if needed)
+ * @param currentReferer
+ * the current referer, for websites that needs this info
+ * @param cookiesValues
+ * the cookies
* @param postParams
* the POST parameters
* @param getParams
@@ -214,17 +239,18 @@ public class Downloader {
* @throws IOException
* in case of I/O error
*/
- private InputStream open(URL url, final URL originalUrl,
- URL currentReferer, Map