switched from builtin.jar to using util.Encode
[org.ibex.core.git] / src / org / ibex / core / Stream.java
index 60afa46..a17c9b8 100644 (file)
@@ -109,6 +109,14 @@ public abstract class Stream extends JS.O implements JS.Cloneable {
         public InputStream getInputStream() throws IOException { return Platform.getBuiltinInputStream(); }
     }
 
+    /** the Builtin resource */
+    public static class FromInputStream extends Stream {
+        private final InputStream is;
+        public FromInputStream(InputStream is) { this.is = is; }
+        public String getCacheKey() throws NotCacheableException { throw new NotCacheableException(); }
+        public InputStream getInputStream() throws IOException { return is; }
+    }
+
     /** shadow resource which replaces the graft */
     public static class ProgressWatcher extends Stream {
         final Stream watchee;