恩,查了以下API,关于wirteUTF():
First, two bytes are written to the output stream 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 the character.
就是说你在读的时候,先读两个字节的长度,然后按长度读内容,把内容按照UTF-8编码创建字符串,应该就可以了