コード例 #1
0
  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();
  }
コード例 #2
0
 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;
 }