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.
没觉得这段英文有什么难的 你学java难道不看api?
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 这给解释一下谢谢
你学java难道不看api?
这给解释一下谢谢
比如writeUTF("abc");
头两个字节是0、3
inout.writeShort(length);
inout.writeUTF(out);
inout.close();
这样写对吗