// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import javax.xml.bind.DatatypeConverter;

public class B647 {
    public static void main(String[] args) throws Exception {
        byte[] b = { 1, 2, 3, 4 };
        String s = DatatypeConverter.printBase64Binary(b);
        System.out.println(s);
        byte[] b2 = DatatypeConverter.parseBase64Binary(s);
        System.out.println(b[0] + " " + b[3]);
    }
}
