?? textcopy.java
字號(hào):
import java.lang.*;
import java.io.*;
public class TextCopy extends Object
{
/*
method: main
params:
1. String[] args
return type: void
create time: 2004-08-25 23:20:52
author: litertiger
*/
public static void main(String[] args)
{
byte[] b1=new byte[255];
byte[] b2=new byte[255];
byte[] b3=new byte[2056];
byte[] b4=new byte[2056];
try{
System.out.println("input the name:\n");
System.in.read(b1,0,255);
System.out.println("please input the destination\n");
System.in.read(b2,0,255);
String sourceName=new String (b1,0);
String desName=new String (b2,0);
FileInputStream fileInput=new FileInputStream(sourceName);
int byte1=fileInput.read(b3.0,2056);
FileOnputStream fileOutput=new FileOnputStream(desName);
Fileoutput.write(b3,0,bytes1);
fileInput=new FileInputStream(desName);
String desFile=new String(b4,0,0,bytes2);
System.out.println("源文件的內(nèi)容是:\n");
System.out.println(desFile);
}
catch(Exception e)
{System.out.println(e.toString());
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -