总结:输入流、输出流。。子类多。需要加强:
package com.da;
import java.io.*;
public class rtr {
public static void main(String[] args) {
File file=new File("dfad.txt");
OutputStream ops=null;
try{
ops=new FileOutputStream(file,true);//是否追加
String a="fasdf is my ";
byte []b=new byte[1325];
for(byte temp:b){
ops.write(temp);
}
ops.close();
ops=new FileOutputStream(file,true);
a="
我是换行哦";
b=a.getBytes();//因为a是字符串型,所以要转换成字节型
for(byte temp:b){
ops.write(temp);
}
ops.close();
}
}}