⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filecopy.java

📁 这是我自己照着书上敲的
💻 JAVA
字号:
/*
 * Created on 2007-9-22
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
import java.io.*;
/**
 * @author Administrator
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class FileCopy 
{
	public static void main(String args[])
	{
		try
		{
			FileInputStream fin=new FileInputStream("e:\\TestSBStream.java");
			FileOutputStream fout=new FileOutputStream("out_file");
			int c;
			while((c=fin.read())!=-1)
			{
				fout.write(c);
			}
			fin.close();
			fout.close();			
		}
		catch(FileNotFoundException e)
		{
			System.out.println("File not found:"+e);
		}
		catch(IOException e)
		{
			System.out.println("IO Exception:"+e);
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -