List of usage examples for org.apache.poi.hpsf HPSFPropertiesOnlyDocument HPSFPropertiesOnlyDocument
public HPSFPropertiesOnlyDocument(POIFSFileSystem fs)
From source file:com.liferay.sync.engine.util.MSOfficeFileUtil.java
License:Open Source License
public static Date getLastSavedDate(Path filePath) { NPOIFSFileSystem npoifsFileSystem = null; try {//from www. j a v a 2s .c o m 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; } } } }