List of utility methods to do Properties Save
void | save() Internal method to persist all the settings to the file if (properties != null) { try { properties.store(new FileWriter(SETTINGS_FILEPATH), ""); } catch (IOException e) { e.printStackTrace(); |
void | save() save try { FileOutputStream fos = new FileOutputStream(cfgPath); p.setProperty("bbb", "333444"); p.store(fos, ""); fos.flush(); fos.close(); System.out.println("store properties success"); } catch (Exception e) { ... |
void | save(File file, Properties properties) Saves the given Properties to the given File . if (!file.exists()) { if (!file.getParentFile().exists()) { boolean mkdirs = file.getParentFile().mkdirs(); if (!mkdirs) { throw new IOException(String.format("Failed to create parent directories of file %s", file.getAbsolutePath())); boolean createFile = file.createNewFile(); if (!createFile) { throw new IOException(String.format("Failed to create file %s", file.getAbsolutePath())); FileWriter f_writer = new FileWriter(file); try { properties.store(f_writer, null); } catch (IOException ex) { f_writer.close(); throw ex; f_writer.close(); |
void | save(Properties properties, File propertiesFile) Saves properties to a file. OutputStream out = null; try { checkNotNull(propertiesFile).getParentFile().mkdirs(); out = new BufferedOutputStream(new FileOutputStream(propertiesFile)); if (propertiesFile.getName().endsWith(".xml")) { properties.storeToXML(out, null); } else { properties.store(out, null); ... |
void | save(Properties props, File file, String comment) save try (OutputStream stream = new FileOutputStream(file)) { props.store(stream, comment); stream.close(); |
void | save(String fileName, CharSequence string) Saves the specified character sequence. File file; try { Properties props = new Properties(); props.loadFromXML(new FileInputStream(propertyFile)); file = new File( props.getProperty("currentDirectory") + System.getProperty("file.separator") + fileName); } catch (Exception e) { file = new File(fileName); ... |
void | saveBuildConfiguration(IFile ifile) save Build Configuration File file = ifile.getLocation().toFile(); IProject project = ifile.getProject(); try { IJavaProject jp = JavaCore.create(project); IClasspathEntry[] entries = jp.getRawClasspath(); List srcIncludes = new ArrayList(); List srcExcludes = new ArrayList(); List srcInclusionpatterns = new ArrayList(); ... |
void | saveConfig() Save the current config to disk. if (props == null) return; props.store(new FileWriter(cfg), null); |
void | saveConfig(File settingsFile, Properties properties) save Config FileOutputStream settingsOut = new FileOutputStream(settingsFile); properties.store(settingsOut, "Ticket check settings"); settingsOut.close(); |
void | saveDefaultScriptDirectory(String path) save Default Script Directory config.setProperty(DEFAULT_SCRIPT_DIR, path); store(); |