List of utility methods to do Properties Save
void | SaveDeployedObjects(String outputDirectory) Save Deployed Objects try { 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(); ... |
void | saveInstalledChecksumCache(File dir, Map Saves the given checksums into the folder in the #FOLDER_CHECKSUM_CACHE file File cacheFile = new File(dir, FOLDER_CHECKSUM_CACHE); Properties properties = new Properties(); Set<Map.Entry<File, Long>> entries = checksums.entrySet(); for (Map.Entry<File, Long> entry : entries) { properties.put(entry.getKey().getName(), "" + entry.getValue()); properties.store(new FileWriter(cacheFile), "Updated on " + new Date()); |
boolean | saveMailAtt(String host, String userName, String password, String from, String directory) This method will open a pop mail box and read through all messages. int msgFound = -1; boolean mailRead = false; Properties props = new Properties(); Session session = Session.getInstance(props, null); Store store = session.getStore("pop3"); store.connect(host, userName, password); Folder folder = store.getFolder("INBOX"); folder.open(Folder.READ_ONLY); ... |
void | saveOccurrencesAsText(String fileName, TreeMap Saves those occurrences of a frequency distribution which have the specified frequency into a text file. StringBuilder out = new StringBuilder("Occurrences with frequency " + frequency + " (" + fileName + "):\n"); int i; int count = 1; boolean ignoreTuple; int linebreak = 2; for (String tuple : distribution.keySet()) { linebreak = 80 / (tuple.length() + 2); break; ... |
void | saveOutputFile(String prefix, String suffix, String data) Saves data into test "output" file Test output files will be picked up by OUnit report generator and displayed to the user if possible. saveOutputFile(prefix, suffix, data.getBytes()); |
void | saveParamsToFile(String fileName, String[] params) guarda las tuplas parametro-valor en el fichero dado. saveParamsToFile(fileName, params, new File(fileName).getName().toString() + " PARAMS"); |
String | saveParamToFile(String fileName, String param, String value) save Param To File return saveParamToFile(fileName, param, value, new File(fileName).getName().toString() + " PARAMS"); |
void | saveProperties() Attempt to save the properties file. saveProperties(null, null, null); |
void | saveProperties(final IResource modelResource, final Properties props) Store the properties final File file = getPropertiesFile(modelResource); try { final OutputStream os = new FileOutputStream(file); props.store(os, null); os.close(); modelResource.getParent().refreshLocal(IResource.DEPTH_INFINITE, null); } catch (final Exception e) { throw new IllegalStateException("Exception for file on path " ... |
void | saveProperties(Map save Properties PrintStream ps = new PrintStream(file, encoding); for (Entry<String, String> entry : map.entrySet()) { ps.println(entry.getKey()); ps.println(entry.getValue()); ps.println(); ps.close(); |