Base64
class is not part of the web profile in Java EE 6. It will be part of Java EE 7 so you could use it. I chose to add the comments in the code below, but decided that I would use the com.sun.misc.Base64Decoder
which is currently available in Java SE 6 and 7.UPDATE: I got a suggestion on Google+ from +Thomas Darimont who mentioned using
DatatypeConverter.parseBase64Binary()
from the Java API for XML Binding (JAXB). I confirmed that it is available in Java EE 5 and 6. It is also in the Web Profile in Java EE 6.
0 comments :
Post a Comment