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

📄 buffer.java

📁 学了2个月java 练习用~ 可以看下 希望同意
💻 JAVA
字号:
import java.util.*;
import java.io.*;

public class buffer
{
	public static void main(String[] args) throws Exception
	{
		buffertest("C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\示例图片\\Blue hills.jpg","D:\\abc.jpg");
	}

	public static void buffertest(String a,String b)throws Exception{
		File ain=new File(a);
		File bout=new File(b);
		if(ain.exists()){
			ain.createNewFile();
		}
		FileInputStream anow=new FileInputStream(ain);
		BufferedOutputStream bnow=new BufferedOutputStream(new FileOutputStream(bout),1024);

		int i=-1;
		while ((i=anow.read())!=-1){

			bnow.write(i);

		}


	}

}

⌨️ 快捷键说明

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