/** * Factory method for PersistentPropertyStorage. Guarantees that only a * single PersistentPropertyStorage object exists for any property file. * * @param propertyFile the name of the property file to use * * @throws IOException if <code>propertyFile</code> cannot be converted into * a canonical path name (via {@link File#getCanonicalPath()}). */ synchronized static PersistentPropertyStorage newPersistentPropertyStorage( String propertyFile) throws IOException { File file = new File(propertyFile); String canonicalName = file.getCanonicalPath(); if (propertyFileMap.containsKey(canonicalName)) { return (PersistentPropertyStorage) propertyFileMap.get( canonicalName); } PersistentPropertyStorage storage = new PersistentPropertyStorage(file); propertyFileMap.put(canonicalName, storage); return storage; }
PersistentPropertyStorage.newPersistentPropertyStorage( propertyFileLocation.get()); } catch (IOException e) { storage.storeProperty(this); } catch (IOException e) { tracer.warning(
writePropertyValue(writer, property); propertyStored = true; } else { try { writer.newLine(); writePropertyValue(writer, property); writer.newLine(); writer.flush();