日期:2014-05-20  浏览次数:20695 次

RandomAccessFile用 writeUTF() 写文件的时候为什么第一个字符会是乱码?
RandomAccessFile用     writeUTF()   写文件的时候为什么第一个字符会是乱码,请高手指点

------解决方案--------------------
First, two bytes are written to the file, starting at the current file pointer, as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for each character.