public void save()

in commons-transfer/commons-transfer-api/src/main/java/org/apache/archiva/commons/transfer/defaults/DefaultTransferStore.java [132:159]


    public void save() throws IOException {
        FileWriter writer = null;
        try {
            File outdir = file.getParentFile();
            if((outdir != null) && (outdir.exists() == false)) {
                if(outdir.mkdirs() == false) {
                    System.err.println("Unable to create destination directory: " + outdir.getAbsolutePath());
                }
            }

            writer = new FileWriter(file);
            PrintWriter p = new PrintWriter(writer);
            p.println("# Created by " + DefaultTransferStore.class.getName());
            p.println("# WARNING: Editing this file by hand is detrimental to your free time.");
            p.println("# Written: " + new SimpleDateFormat().format(Calendar.getInstance().getTime()));
            p.println();
            for (Map.Entry<String, String> entry : config.entrySet()) {
                p.println(entry.getKey() + "=" + entry.getValue());
            }
            p.println();
        } catch (IOException e) {
            // Unable to store properties.
            log.error("Unable to store the existing properties.", e);
            throw e;
        } finally {
            IOUtils.closeQuietly(writer);
        }
    }