不使用BASE64Encoder、BASE64Decoder


BASE64Encoder/BASE64Decoder類在sun.misc包下,是sun公司的內部方法,后期有刪除的潛在可能,建議使用apache commons.codec下的Base64替代。

maven依賴:

1 <dependency>
2     <groupId>commons-codec</groupId>
3     <artifactId>commons-codec</artifactId>
4     <version>${commons-codec.version}</version>
5 </dependency>

java代碼:

Base64.encodeBase64String(...);
Base64.decodeBase64(...);


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM