private void copyFile() {
        if (input == null) {
            JOptionPane.showMessageDialog(null, "Por Favor selecione um Ficheiro");
            return;
        }
        try {
            File file = new File(out, nomeFile);
            System.out.println("file = " + file.getPath());
            if (!file.exists()) {
                file.createNewFile();
            }

            BufferedReader br = new BufferedReader(
                    new InputStreamReader(
                            new FileInputStream(input)));
            BufferedWriter bw = new BufferedWriter(
                    new OutputStreamWriter(
                            new FileOutputStream(file)));
            String line;
            while ((line = br.readLine()) != null) {
                bw.write(line, 0, line.length());
                bw.newLine();
            }
            br.close();
            bw.close();

        } catch (IOException e) {
            System.err.println("Exception occured:" + e.getMessage());
        }
    }