Advertisement
Guest User

Untitled

a guest
Aug 13th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package io;
  2. import java.io.*;
  3.  
  4. public class CopyFile {
  5.     public static void main(String[] args) throws IOException{
  6.         File src=new File("properties.txt");
  7.         File des=new File("properties.back.txt");
  8.         FileInputStream fis=new FileInputStream(src);
  9.         FileOutputStream fos=new FileOutputStream(des);
  10.        
  11.         int data;
  12.         while((data=fis.read())!=-1){
  13.             fos.write(data);
  14.         }
  15.         fis.close();
  16.         fos.close();
  17.        
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement