List of usage examples for org.apache.poi.hpsf HPSFPropertiesOnlyDocument getSummaryInformation
public SummaryInformation getSummaryInformation()
From source file:com.liferay.sync.engine.util.MSOfficeFileUtil.java
License:Open Source License
public static Date getLastSavedDate(Path filePath) { NPOIFSFileSystem npoifsFileSystem = null; try {// w ww . ja v a2 s . c om npoifsFileSystem = new NPOIFSFileSystem(filePath.toFile()); HPSFPropertiesOnlyDocument hpsfPropertiesOnlyDocument = new HPSFPropertiesOnlyDocument( npoifsFileSystem); SummaryInformation summaryInformation = hpsfPropertiesOnlyDocument.getSummaryInformation(); return summaryInformation.getLastSaveDateTime(); } catch (Exception e) { return null; } finally { if (npoifsFileSystem != null) { try { npoifsFileSystem.close(); } catch (Exception e) { return null; } } } }