writeUTF
public void writeUTF(String str) throws IOException
-
Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string。
-
writeUTF在发送的时候,会自动加上数据长度信息
public void writeUTF(String str) throws IOException