/** * Store all properties, those local and also those in parent props * * @param file The file to store to * @throws IOException If there is an error writing */ public void storeFlattened(final File file) throws IOException { final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); try { storeFlattened(out); } finally { out.close(); } }
public File createFlattenedPropsFile(final String workingDir) { final File directory = new File(workingDir); File tempFile = null; try { // The temp file prefix must be at least 3 characters. tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory); this.jobProps.storeFlattened(tempFile); } catch (final IOException e) { throw new RuntimeException("Failed to create temp property file ", e); } return tempFile; }
pluginProps.put("pluginprops3", "4"); pluginProps .storeFlattened(new File(anothertestfolder, "plugin.properties")); commonPlugin.removeLocal("commonprop2"); commonPlugin .storeFlattened(new File(this.testPluginDirPath + "/common.properties")); commonPrivate.put("newcommonprivate1", "2"); commonPrivate.removeLocal("commonprivate2"); commonPrivate.storeFlattened(new File(this.testPluginDirPath + "/commonprivate.properties"));
/** * Store all properties, those local and also those in parent props * * @param file The file to store to * @throws IOException If there is an error writing */ public void storeFlattened(final File file) throws IOException { final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); try { storeFlattened(out); } finally { out.close(); } }
public File createFlattenedPropsFile(final String workingDir) { File directory = new File(workingDir); File tempFile = null; try { // The temp file prefix must be at least 3 characters. tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory); jobProps.storeFlattened(tempFile); } catch (IOException e) { throw new RuntimeException("Failed to create temp property file ", e); } return tempFile; }
/** * Store all properties, those local and also those in parent props * * @param file * The file to store to * @throws IOException * If there is an error writing */ public void storeFlattened(File file) throws IOException { BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream(file)); try { storeFlattened(out); } finally { out.close(); } }
public File createFlattenedPropsFile(final String workingDir) { final File directory = new File(workingDir); File tempFile = null; try { // The temp file prefix must be at least 3 characters. tempFile = File.createTempFile(getId() + "_props_", "_tmp", directory); this.jobProps.storeFlattened(tempFile); } catch (final IOException e) { throw new RuntimeException("Failed to create temp property file ", e); } return tempFile; }