private void attemptToReadPropertiesFile(File file, PageData data, long lastModifiedTime) throws Exception { InputStream input = null; try { final WikiPageProperties props = new WikiPageProperties(); input = new FileInputStream(file); props.loadFromXmlStream(input); props.setLastModificationTime(new Date(lastModifiedTime)); data.setProperties(props); } finally { if (input != null) input.close(); } }
public WikiPageProperties(InputStream inputStream) { this(); loadFromXmlStream(inputStream); }