它们之间的主要区别是什么?
它们仍然都是用于编写字符串的。
public void writeUTF(String str)
throws IOException
Primitive data write of this String in modified UTF-8 format.
vs
public void writeBytes(String str)
throws IOException
Writes a String as a sequence of bytes.
什么情况下应该使用其中一个而不是另一个?