/** cache of subresources so that the equality operator works on them */
private Hash refCache = null;
/** cache of subresources so that the equality operator works on them */
private Hash refCache = null;
/** returns an InputStream containing the Resource's contents */
public InputStream getInputStream() throws IOException { return getInputStream(""); }
public abstract InputStream getInputStream(String path) throws IOException;
/** returns an InputStream containing the Resource's contents */
public InputStream getInputStream() throws IOException { return getInputStream(""); }
public abstract InputStream getInputStream(String path) throws IOException;
if (url.startsWith("https://")) return new HTTP(url);
if (url.startsWith("file:") && permitLocalFilesystem) return new File(url.substring(5));
if (url.startsWith("cab:")) return new CAB(stringToRes(url.substring(4)));
if (url.startsWith("https://")) return new HTTP(url);
if (url.startsWith("file:") && permitLocalFilesystem) return new File(url.substring(5));
if (url.startsWith("cab:")) return new CAB(stringToRes(url.substring(4)));
public Res addExtension(String extension) {
return (key instanceof String && ((String)key).endsWith(extension)) ? this : new Ref(parent, key + extension);
}
public InputStream getInputStream(String path) throws IOException {
return parent.getInputStream("/" + key + path);
}
public Res addExtension(String extension) {
return (key instanceof String && ((String)key).endsWith(extension)) ? this : new Ref(parent, key + extension);
}
public InputStream getInputStream(String path) throws IOException {
return parent.getInputStream("/" + key + path);
}
public int hashCode() { return graftee.hashCode(); }
public InputStream getInputStream(String s) throws IOException { return graftee.getInputStream(s); }
public Object get(Object key) { return replaced_key.equals(key) ? replaced_val : graftee.get(key); }
public int hashCode() { return graftee.hashCode(); }
public InputStream getInputStream(String s) throws IOException { return graftee.getInputStream(s); }
public Object get(Object key) { return replaced_key.equals(key) ? replaced_val : graftee.get(key); }