?? ex.java~13~
字號:
package testsystem;
import java.io.*;
import java.util.*;
public class EX
{
public static void main(String arsg[])
{
try {
System.out.println("創(chuàng)建文件輸入流對象。。。");
FileInputStream fs=new FileInputStream("E:\\input.txt");
byte data[]=new byte[200];
System.out.println("讀入文件數(shù)據(jù)到指定組數(shù)中。。。");
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("創(chuàng)建文件輸出對象。。。");
FileOutputStream fos=new FileOutputStream("E:\\output.txt");
System.out.println("將指定數(shù)組中的內(nèi)容讀入到文件中。。。");
fos.write(str.getBytes());
System.out.println("關(guān)閉所有文件");
fs.close();
fos.close();
} catch (Exception ex) {
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -