public void processPage(WikiPage page) throws Exception { FileSystemPage fsPage = (FileSystemPage) page; String path = fsPage.getFileSystemPath(); File oldPropsFile = new File(path + old_propertiesFilename); Properties oldProps = loadOldProperties(oldPropsFile); saveNewProperties(path, oldProps); oldPropsFile.delete(); }
private Properties loadOldProperties(File oldPropsFile) throws IOException { Properties oldProps = new Properties(); if (oldPropsFile.exists()) { FileInputStream is = new FileInputStream(oldPropsFile); oldProps.load(is); is.close(); } return oldProps; }