licensing update to APSL 2.0
[org.ibex.js.git] / src / org / ibex / js / Fountain.java
index 264f2ff..c015f4c 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 Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
 package org.ibex.js;
 
 import java.io.*;
@@ -12,7 +15,7 @@ import org.ibex.net.*;
  *   be totally independent of the others (ie separate stream position
  *   and state) although they draw from the same data source.
  */
-public abstract class Fountain extends JS.Cloneable {
+public abstract class Fountain extends JS.O implements JS.Cloneable {
 
     // Public Interface //////////////////////////////////////////////////////////////////////////////
 
@@ -37,7 +40,7 @@ public abstract class Fountain extends JS.Cloneable {
     /** HTTP or HTTPS resource */
     public static class HTTP extends Fountain {
         private String url;
-        public String toString() { return "Stream.HTTP:" + url; }
+        //public String toString() { return "Stream.HTTP:" + url; }
         public HTTP(String url) { while (url.endsWith("/")) url = url.substring(0, url.length() - 1); this.url = url; }
         public Object _get(Object key) { return new HTTP(url + "/" + (String)key); }
         public String getCacheKey(Vec path) throws NotCacheableException { return url; }
@@ -58,7 +61,7 @@ public abstract class Fountain extends JS.Cloneable {
     public static class File extends Fountain {
         private String path;
         public File(String path) { this.path = path; }
-        public String toString() { return "file:" + path; }
+        //public String toString() { return "file:" + path; }
         public String getCacheKey() throws NotCacheableException { throw new NotCacheableException(); /* already on disk */ }
         public InputStream getInputStream() throws IOException { return new FileInputStream(path); }
         public Object _get(Object key) { return new File(path + java.io.File.separatorChar + (String)key); }