added Base64.InputStream
authoradam <adam@megacz.com>
Tue, 3 Aug 2004 07:24:03 +0000 (07:24 +0000)
committeradam <adam@megacz.com>
Tue, 3 Aug 2004 07:24:03 +0000 (07:24 +0000)
darcs-hash:20040803072403-5007d-d77995d4dfe750265475a3218df4aaacea96965d.gz

src/org/ibex/util/Base64.java

index d3bb10d..35fd3b9 100644 (file)
@@ -15,6 +15,11 @@ public class Base64 {
         (byte)'9', (byte)'+', (byte)'/'
     };
 
+    // FIXME could be far more efficient
+    public static class InputStream extends java.io.ByteArrayInputStream {
+        public InputStream(String s) { super(decode(s.getBytes())); }
+    }
+
     /**
      * encode the input data producong a base 64 encoded byte array.
      *