// Public Interface //////////////////////////////////////////////////////////////////////////////
+ // FIXME: This should be in JS, "everything has a stream"
public static InputStream getInputStream(JS js) throws IOException { return ((Stream)js.unclone()).getInputStream();}
public static class NotCacheableException extends Exception { }
private Cache getCache = new Cache(100);
- protected JS _get(Object key) { return null; }
- public final JS get(JS key) {
+ // FEATURE: Mandate that Streams use only String keys?
+ protected JS _get(JS key) throws JSExn { return null; }
+ public final JS get(JS key) throws JSExn {
JS ret = (JS) getCache.get(key);
if (ret == null) getCache.put(key, ret = _get(key));
return ret;