Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java org.apache.commons.codec.binary.Base64和&;com.sun.org.apache.xml.internal.security.utils.Base64?_Java_Base64 - Fatal编程技术网

Java org.apache.commons.codec.binary.Base64和&;com.sun.org.apache.xml.internal.security.utils.Base64?

Java org.apache.commons.codec.binary.Base64和&;com.sun.org.apache.xml.internal.security.utils.Base64?,java,base64,Java,Base64,也许这不是一个编程问题,但我想澄清一下 org.apache.commons.codec.binary.Base64和com.sun.org.apache.xml.internal.security.utils.Base64之间有什么区别吗 我的一些J2EE应用程序类使用的是org.apache.commons.codec.binary.Base64,还有一些使用的是com.sun.org.apache.xml.internal.security.utils.Base64 我想改为org.apa

也许这不是一个编程问题,但我想澄清一下

org.apache.commons.codec.binary.Base64
com.sun.org.apache.xml.internal.security.utils.Base64
之间有什么区别吗

我的一些J2EE应用程序类使用的是
org.apache.commons.codec.binary.Base64
,还有一些使用的是
com.sun.org.apache.xml.internal.security.utils.Base64

我想改为
org.apache.commons.codec.binary.Base64,因为它是稳定的

我的应用程序已经运行良好,但更改后它是否会继续运行良好,即。, 由
com.sun.org.apache.xml.internal.security.utils.Base64
方法完成的编码是否能够通过
org.apache.commons.codec.binary.Base64
方法进行解码

在更改生产代码之前,我只想澄清一下


请澄清。

您应该始终避免直接使用com.sun.*包中的类。这些是用于实现JVM的内部类。它们可以在每次更新时不经通知就进行更改,从而破坏您的代码


Base64由IETF标准化,因此两种实现应产生相同的输出

我认为apache one符合RFC 2045,RFC2045描述的是MIME格式,而不是Base64编码。如上所述,关于Base64的当前有效文档是RFC4648。