Google knows all ("java byte array to base64"). Seriously dude, it took me all of 20 seconds to find this using google:
try {
byte[] buf = new byte[]{0x12, 0x23};
String s = new sun.misc.BASE64Encoder().encode(buf);
buf = new sun.misc.BASE64Decoder().decodeBuffer(s);
} catch (IOException e) {
}
EDIT ===============
Why did you mark this as the answer, and then un-mark it?
EDIT AGAIN ==============
Did you have trouble googling how to go back to a byte array from a base64 string? I found a page that has code for going both ways:
http://www.rgagnon.com/javadetails/java-0598.html[
^]