使用字节流如何写入换行符 Windows: \r\n Linux \n Mac \r 如:写一个Windows系统可以读取的换行符 a.write("\r\n".getBytes()); 注:换行符不会显示,系统读取到换行符时候会自动换行。