note to self
[org.ibex.util.git] / src / org / ibex / util / Encode.java
index cd4d39e..790c526 100644 (file)
@@ -8,6 +8,8 @@ import java.io.*;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
 
+// FEATURE: add ASCII85Encoding (see pdf spec)
+
 /** General <tt>String</tt> and <tt>byte[]</tt> processing functions,
  *  including Base64 and a safe filename transform.
  *
@@ -130,6 +132,8 @@ public final class Encode {
 
     public static byte[] toBase64(String data) { return toBase64(data.getBytes()); }
 
+    public static String toBase64String(byte[] data) { return new String(toBase64(data)); }
+
     /** Encode the input data producong a base 64 encoded byte array.
      *  @return A byte array containing the base 64 encoded data. */
     public static byte[] toBase64(byte[] data) {