Discuss / Java / 作业

作业

Topic source

public static void copy(String strPath1,String strPath2) throws IOException {

// TODO Auto-generated method stub

try(InputStream input = new FileInputStream(strPath1);OutputStream output = new FileOutputStream(strPath2)){

byte[] b = new byte[1000];

input.read(b);

output.write(b);

}

}


  • 1

Reply