licensing cleanup (GPLv2)
[org.ibex.core.git] / src / org / ibex / core / Stream.java
index 60afa46..83d4d1b 100644 (file)
@@ -1,4 +1,7 @@
-// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the GNU General Public License version 2 ("the License").
+// You may not use this file except in compliance with the License.
+
 package org.ibex.core;
 
 import java.io.*;
@@ -109,6 +112,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;