1 32 33 package com.knowgate.ole; 34 35 import java.io.IOException ; 36 import java.io.FileNotFoundException ; 37 import java.io.FileInputStream ; 38 39 import org.apache.poi.hpsf.SummaryInformation; 40 import org.apache.poi.poifs.eventfilesystem.POIFSReader; 41 42 47 48 public class OLEDocument { 49 50 private POIFSReader oReader; 51 private OLEListener oListener; 52 53 public OLEDocument() { 54 55 oReader = new POIFSReader(); 56 oListener = new OLEListener(); 57 58 oReader.registerListener(oListener, "\005SummaryInformation"); 59 60 } 61 62 68 public void read (String sFilePath) throws IOException , FileNotFoundException { 69 FileInputStream oIOStream = new FileInputStream (sFilePath); 70 71 oReader.read(oIOStream); 72 73 oIOStream.close(); 74 } 75 76 public SummaryInformation getSummaryInformation() { 77 return oListener.getSummaryInformation(); 78 } 79 } | Popular Tags |