/*字节流写数据问题
1.换行
2.追加写入
3.异常处理*/
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class Deom {
public static void main(String[] args) throws IOException {
FileOutputStream fos = null;
try {
fos=new FileOutputStream("Array\\src\\Day08\\Text04\\点名.txt",true);
//创建字节输出流对象追加输出
fos.write("hel\r\nlo".getBytes());
//释放资源
} catch (IOException e) {
e.printStackTrace();
} finally {
if (fos != null) {
fos.close();
}
}
}
}