Convert a byte array to base64 string
public class Main { public static void main(String[] argv) throws Exception { byte[] buf = new byte[] { 0x12, 0x23 }; String s = new sun.misc.BASE64Encoder().encode(buf); } }