📄 filetransport.java
字号:
/**
* Email: taorundong@126.com
*
* @author taorundong
* @version 1.00 07/02/11
*/
import java.util.*;
import java.net.*;
import java.io.*;
public class FileTransport extends Thread implements Runnable{
File file = null;
FileInputStream fileInput = null;
FileTransport(){
super();
try{
file = new File("hello.wav");
fileInput = new FileInputStream(file);
}
catch(Exception e){
e.printStackTrace();
}
transMission("press.wav");
}
public void transMission(String name){
File temp = new File(name);
try{
FileOutputStream output = new FileOutputStream(temp);
byte []b = new byte[100];
while(fileInput.read(b)!=-1){
output.write(b);
}
fileInput.close();
output.close();
}
catch(Exception e){
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -