import java.io.*;
class CopyText
{
public static void main(String[] arge)
{
copy_1();
}
public static void copy_1()
{
FileWriter fw = null;//大哥,你这个流用的不对,这个writer和reader专门是用于字符流的操作,也就是文本类型的文件。
//换成这样就可以了 FileInputStream fis = null;FileOutputStream fos = null;
FileReader fr = null;
//int ch = 0;
char[] ch = new char[1024];
try
{
//fis = new FileInputStream("文件"); byte[] buf = new byte[1024]; int len = 0; fos = new FileOutputStream("目的");
//while((len = fis.read(buf))){fos.write(buf,0,len);}
fw = new FileWriter("3_copy.jpg");
fr = new FileReader("F:\\图片\\ps\\3.jpg");
while((fr.read(ch))!=-1)
{
fw.write(ch);
}
}