licensing update to APSL 2.0
[org.ibex.util.git] / src / org / ibex / util / Base64.java
index d3bb10d..b7f8900 100644 (file)
@@ -1,3 +1,7 @@
+// 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.util;
 
 public class Base64 {
@@ -15,6 +19,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.
      *