Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package io;
- import java.io.*;
- public class CopyFile {
- public static void main(String[] args) throws IOException{
- File src=new File("properties.txt");
- File des=new File("properties.back.txt");
- FileInputStream fis=new FileInputStream(src);
- FileOutputStream fos=new FileOutputStream(des);
- int data;
- while((data=fis.read())!=-1){
- fos.write(data);
- }
- fis.close();
- fos.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement