Question:
I understood that Java always uses Big Endian. Why does the code at How can I store and retrieve Unicode or Double Byte data in a file using the java.io libraries? produce Little Endian output?
Answer:
Actually, Java’s guaranteed usage of Big Endian only applies to what I will loosely call “numbers.” String or byte encodings for characters are a different matter altogether. The Little Endian output in the referenced code results from Java’s interpretation of the “Unicode” alias, which on NT, at least, apparently resolves to “UnicodeLittle.” This is not a problem in the code, because a byte order mark is written, but it would have been better to use an encoding from character encoding or Supported Encodings. 今天的文章java unicode endian分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/26641.html