Encoding as Base64 in Java
I need to encode some data in the Base64 encoding in Java. How do I do that? What is the name of the class that provides a Base64 encoder? I tried to use the sun.misc.BASE64Encoder class, without success. I have the following line of Java 7 code: wr.write(new sun.misc.BASE64Encoder().encode(buf)); I’m using Eclipse. Eclipse marks this … Read more