aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/cache/Resource.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/cache/Resource.java')
-rw-r--r--netx/net/sourceforge/jnlp/cache/Resource.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/Resource.java b/netx/net/sourceforge/jnlp/cache/Resource.java
index 9818b64..57aa338 100644
--- a/netx/net/sourceforge/jnlp/cache/Resource.java
+++ b/netx/net/sourceforge/jnlp/cache/Resource.java
@@ -67,6 +67,9 @@ public class Resource {
/** the remote location of the resource */
URL location;
+ /** the location to use when downloading */
+ private URL downloadLocation;
+
/** the local file downloaded to */
File localFile;
@@ -96,6 +99,7 @@ public class Resource {
*/
private Resource(URL location, Version requestVersion, UpdatePolicy updatePolicy) {
this.location = location;
+ this.downloadLocation = location;
this.requestVersion = requestVersion;
this.updatePolicy = updatePolicy;
}
@@ -130,6 +134,24 @@ public class Resource {
}
/**
+ * Returns the URL to use for downloading the resource. This can be
+ * different from the original location since it may use a different
+ * file name to support versioning and compression
+ * @return the url to use when downloading
+ */
+ public URL getDownloadLocation() {
+ return downloadLocation;
+ }
+
+ /**
+ * Set the url to use for downloading the resource
+ * @param location
+ */
+ public void setDownloadLocation(URL location) {
+ downloadLocation = location;
+ }
+
+ /**
* Returns the tracker that first created or monitored the
* resource, or null if no trackers are monitoring the resource.
*/