?? filestream.java
字號(hào):
package filestream;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2005</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
import java.io.*;
class filestream {
public static void main(String args[]) {
try {
File inFile = new File("file1.txt");
File outFile = new File("file2.txt");
FileInputStream fis = new FileInputStream(inFile);
FileOutputStream fos = new FileOutputStream(outFile);
int c;
while ( (c = fis.read()) != -1) {
fos.write(c);
}
fis.close();
fos.close();
}
catch (FileNotFoundException e) {
System.out.println("FileStreamsTest: " + e);
}
catch (IOException e) {
System.err.println("FileStreamsTest: " + e);
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -