package com.yunfengtech.solution.business; import java.io.*; public class copy { public static void main(String[] args) { try{ FileInputStream input=new FileInputStream("D:/111/584.jpg");//可替换为任何路径何和文件名 FileOutputStream output=new FileOutputStream("D:/222/58411.jpg");//可替换为任何路径何和文件名 int in=input.read(); while(in!=-1){ output.write(in); in=input.read(); } }catch (IOException e){ System.out.println(e.toString()); } } }