public URL getLocalURL(String location) throws IOException {
   if (isUpToDate(location)) {
     return local.getURL(location);
   }
   Map<String, Object> metadata = new HashMap<String, Object>();
   InputStream is = remote.getContents(location, metadata);
   local.storeData(location, is, metadata);
   return local.getURL(location);
 }
 public boolean isUpToDate(String location) throws IOException {
   if (!hasLocal(location)) {
     return false;
   }
   long localMod = local.getLocalModificationDate(location);
   long remoteMod = remote.getRemoteModificationDate(location);
   if (localMod >= remoteMod) {
     return true;
   }
   return false;
 }
 public URL getRemoteURL(String location) throws IOException {
   return remote.getURL(location);
 }