X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FCache.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2FCache.java;h=632c8441a35d596dfa6a2f2fc4c635542d1dd83e;hp=7f603c1ba15f1c7e9d812d76941ce616e9d419b3;hb=0efd25e3aa839ba82da1054a470c27830b9ed94a;hpb=e1168b3cca916ab8adccfac1a3bce0f98e25bb07 diff --git a/src/be/nikiroo/fanfix/Cache.java b/src/be/nikiroo/fanfix/Cache.java index 7f603c1..632c844 100644 --- a/src/be/nikiroo/fanfix/Cache.java +++ b/src/be/nikiroo/fanfix/Cache.java @@ -14,7 +14,6 @@ import java.net.CookiePolicy; import java.net.CookieStore; import java.net.HttpCookie; import java.net.HttpURLConnection; -import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; @@ -303,17 +302,13 @@ public class Cache { } /** - * Open a resource (will load it from the cache if possible, or save it into - * the cache after downloading if not) as an Image, then save it where - * requested. - *

- * This version will not always work properly if the original file was not - * downloaded before. + * Save the given resource as an image on disk using the default image + * format for content. * * @param url - * the resource to open - * - * @return the opened resource image + * the resource + * @param target + * the target file * * @throws IOException * in case of I/O error @@ -357,7 +352,7 @@ public class Cache { * * @param uniqueID * the unique ID - * + * * @return the content or NULL */ public InputStream getFromCache(String uniqueID) { @@ -428,7 +423,6 @@ public class Cache { * * @throws IOException * in case of I/O error - * @throws URISyntaxException */ private void save(URL url, BasicSupport support, URL originalUrl) throws IOException { @@ -518,6 +512,7 @@ public class Cache { * * @param url * the url + * * @return the cached version if present, NULL if not */ private File getCached(URL url) { @@ -535,8 +530,9 @@ public class Cache { * Get the cache resource from the cache if it is present for this unique * ID. * - * @param url - * the url + * @param uniqueID + * the id + * * @return the cached version if present, NULL if not */ private File getCached(String uniqueID) {