/**
    *  This class copies an input file to output file
    *
    *  @param String input file to copy from
    *  @param String output file
    */
    public static boolean copy(String input, String output) throws Exception {
        int BUFSIZE = 65536;
        FileInputStream fis = new FileInputStream(input);
        FileOutputStream fos = new FileOutputStream(output);
        try {
            int s;
            byte[] buf = new byte[BUFSIZE];
            while ((s = fis.read(buf)) > -1 ){
                fos.write(buf, 0, s);
            }
       }
       catch (Exception ex) {
           throw new Exception("Can not copy " + input + " to " + output + ex.getMessage());
       }
       finally {
           fis.close();
           fos.close();
       }
        return true;
    }