FileOutputStream fos = new FileOutputStream ("test.txt",true); //如果想追加就在第二个参数传true
fos.write(97);
fos.write(98);
fos.close();