?? ex.java~18~
字號:
package testsystem;
import java.io.*;
import java.util.*;
public class EX
{
public static void main(String arsg[])
{
try {
System.out.println("創建文件輸入流對象。。。");
FileInputStream fs=new FileInputStream("ff.txt");
byte data[]=new byte[200];
System.out.println("讀入文件數據到指定組數中。。。");
fs.read(data);
String str=new String(data);
System.out.println(str);
Date date=new Date();
System.out.println(date.toString());
System.out.println(date);
System.out.println("創建文件輸出對象。。。");
FileOutputStream fos=new FileOutputStream("output.txt");
System.out.println("將指定數組中的內容讀入到文件中。。。");
fos.write(str.getBytes());
System.out.println("關閉所有文件");
fs.close();
fos.close();
} catch (Exception ex) {
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -