FileOutputStream fos = newFileOutputStream("itheima\\src\\ day09\\a.txt"); fos.write(97);
fos.write('\n');
fos.write('b');
fos.write('\r');
fos.write('c'); fos.close();
FileInputStream fis = new FileInputStream("itheima\\src\\ day09\\a.txt");
int b;
while ((b = fis.read()) != -1) {
System.out.print((char) b); }
fis.close();
|