public static void copy(String source,String target){
  InputStream in=null;
  OutputStream out=null;
  try {
    in=new BufferedInputStream(new FileInputStream(source));
    out=new BufferedOutputStream(new FileOutputStream(target));
    for (int c=read(in); c != -1; c=read(in)) {
      write(out,c);
    }
  }
 catch (  FileNotFoundException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
 finally {
    close(in);
    close(out);
  }
  close(in);
  close(out);
}

public static void copy ( String source , String target ) { InputStream in = null ; OutputStream out = null ; try { in = new BufferedInputStream ( new FileInputStream ( source ) ) ; out = new BufferedOutputStream ( new FileOutputStream ( target ) ) ; for ( int c = read ( in ) ; c != - 1 ; c = read ( in ) ) { write ( out , c ) ; } } catch ( FileNotFoundException e ) { throw new RuntimeException ( e . getMessage ( ) , e ) ; } finally { close ( in ) ; close ( out ) ; } close ( in ) ; close ( out ) ; }
copy file from source path to the target file path
