Decode Base64 data in Java

前端 未结 20 1858
时光说笑
时光说笑 2020-11-21 06:04

I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.

20条回答
  •  甜味超标
    2020-11-21 06:38

    As of v6, Java SE ships with JAXB. javax.xml.bind.DatatypeConverter has static methods that make this easy. See parseBase64Binary() and printBase64Binary().

提交回复
热议问题