Encoding as Base64 in Java

前端 未结 17 2503
失恋的感觉
失恋的感觉 2020-11-21 13:44

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 <

17条回答
  •  -上瘾入骨i
    2020-11-21 13:50

    For Java 6-7, the best option is to borrow code from the Android repository. It has no dependencies.

    https://github.com/android/platform_frameworks_base/blob/master/core/java/android/util/Base64.java

提交回复
热议问题