Home » » Copy Java Files in Java Program

Copy Java Files in Java Program

Copy Java Files in Java Program

Copy Java Files in Java Program


Copy.java


import java.io.*;
class copy
{
public Static void main(String args[]) throws IOException
{
FileInputStream fis =new FileInputStream("1.jpg");
FileOutputStream fos =new FileOutputStream("2.jpg");
byte b[] =new byte [fis.available()];
fis.read(b);
fos.write(b);
fos.close();
System.out.println("File successfully copied");
}
}


0 coment�rios:

Post a Comment

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g