Java Properties Save SaveDeployedObjects(String outputDirectory)

Here you can find the source of SaveDeployedObjects(String outputDirectory)

Description

Save Deployed Objects

License

Apache License

Declaration

private static void SaveDeployedObjects(String outputDirectory) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

import java.io.FileOutputStream;

import java.util.Properties;

public class Main {
    private static String DEPLOYED_OBJECT_FILE = "DeployedObjects.properties";
    private static Properties deployedObjectsList = new Properties();

    private static void SaveDeployedObjects(String outputDirectory) {
        try {//  w  w  w  .ja  va  2  s .c  om
            if (!FileExists(outputDirectory + "/savedobjects")) {
                new File(outputDirectory + "/savedobjects").mkdir();
            }
            FileOutputStream ostream = new FileOutputStream(outputDirectory
                    + "/savedobjects/" + DEPLOYED_OBJECT_FILE);
            deployedObjectsList
                    .store(ostream, "-- Deployed Objects in DB2");
            ostream.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static boolean FileExists(String fileName) {
        File f = new File(fileName);
        return f.exists();
    }
}

Related

  1. save(String fileName, CharSequence string)
  2. saveBuildConfiguration(IFile ifile)
  3. saveConfig()
  4. saveConfig(File settingsFile, Properties properties)
  5. saveDefaultScriptDirectory(String path)
  6. saveInstalledChecksumCache(File dir, Map checksums)
  7. saveMailAtt(String host, String userName, String password, String from, String directory)
  8. saveOccurrencesAsText(String fileName, TreeMap distribution, int frequency, char[] ignore)
  9. saveOutputFile(String prefix, String suffix, String data)