import org.apache.poi.hdgf.streams.TrailerStream;
import org.apache.poi.poifs.filesystem.DirectoryNode;
import org.apache.poi.poifs.filesystem.DocumentEntry;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.util.LittleEndian;
private PointerFactory ptrFactory;
public HDGFDiagram(POIFSFileSystem fs) throws IOException {
- this(fs.getRoot(), fs);
+ this(fs.getRoot());
}
- public HDGFDiagram(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
- super(dir, fs);
+ public HDGFDiagram(NPOIFSFileSystem fs) throws IOException {
+ this(fs.getRoot());
+ }
+ /**
+ * @deprecated Use {@link #HDGFDiagram(DirectoryNode)} instead
+ */
+ @Deprecated
+ public HDGFDiagram(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
+ this(dir);
+ }
+ public HDGFDiagram(DirectoryNode dir) throws IOException {
+ super(dir);
DocumentEntry docProps =
(DocumentEntry)dir.getEntry("VisioDocument");
import org.apache.poi.hdgf.streams.PointerContainingStream;
import org.apache.poi.hdgf.streams.Stream;
import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
/**
*/
public final class VisioTextExtractor extends POIOLE2TextExtractor {
private HDGFDiagram hdgf;
- private POIFSFileSystem fs;
public VisioTextExtractor(HDGFDiagram hdgf) {
super(hdgf);
this.hdgf = hdgf;
}
public VisioTextExtractor(POIFSFileSystem fs) throws IOException {
- this(fs.getRoot(), fs);
+ this(fs.getRoot());
}
+ public VisioTextExtractor(NPOIFSFileSystem fs) throws IOException {
+ this(fs.getRoot());
+ }
+ public VisioTextExtractor(DirectoryNode dir) throws IOException {
+ this(new HDGFDiagram(dir));
+ }
+ /**
+ * @deprecated Use {@link #VisioTextExtractor(DirectoryNode)} instead
+ */
+ @Deprecated
public VisioTextExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
this(new HDGFDiagram(dir, fs));
- this.fs = fs;
}
public VisioTextExtractor(InputStream inp) throws IOException {
this(new POIFSFileSystem(inp));
import org.apache.poi.poifs.filesystem.DirectoryNode;
import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.poifs.filesystem.DocumentInputStream;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.POILogFactory;
this(filesystem.getRoot());
}
+ /**
+ * Constructs a Powerpoint document from a POIFS Filesystem. Parses the
+ * document and places all the important stuff into data structures.
+ *
+ * @param filesystem the POIFS FileSystem to read from
+ * @throws IOException if there is a problem while parsing the document.
+ */
+ public HSLFSlideShow(NPOIFSFileSystem filesystem) throws IOException
+ {
+ this(filesystem.getRoot());
+ }
+
/**
* Constructs a Powerpoint document from a specific point in a
* POIFS Filesystem. Parses the document and places all the
* important stuff into data structures.
*
+ * @deprecated Use {@link #HSLFSlideShow(DirectoryNode)} instead
* @param dir the POIFS directory to read from
* @param filesystem the POIFS FileSystem to read from
* @throws IOException if there is a problem while parsing the document.
*/
+ @Deprecated
public HSLFSlideShow(DirectoryNode dir, POIFSFileSystem filesystem) throws IOException
{
this(dir);
import org.apache.poi.hslf.model.*;
import org.apache.poi.hslf.usermodel.SlideShow;
import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
/**
* @param fs the POIFSFileSystem containing the PowerPoint document
*/
public PowerPointExtractor(POIFSFileSystem fs) throws IOException {
- this(new HSLFSlideShow(fs));
+ this(fs.getRoot());
}
+ /**
+ * Creates a PowerPointExtractor, from an open NPOIFSFileSystem
+ *
+ * @param fs the NPOIFSFileSystem containing the PowerPoint document
+ */
+ public PowerPointExtractor(NPOIFSFileSystem fs) throws IOException {
+ this(fs.getRoot());
+ }
+
+ /**
+ * Creates a PowerPointExtractor, from a specific place
+ * inside an open NPOIFSFileSystem
+ *
+ * @param dir the POIFS Directory containing the PowerPoint document
+ */
+ public PowerPointExtractor(DirectoryNode dir) throws IOException {
+ this(new HSLFSlideShow(dir));
+ }
+
+ /**
+ * @deprecated Use {@link #PowerPointExtractor(DirectoryNode)} instead
+ */
+ @Deprecated
public PowerPointExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
this(new HSLFSlideShow(dir, fs));
}
import org.apache.poi.hsmf.exceptions.ChunkNotFoundException;
import org.apache.poi.hsmf.parsers.POIFSChunkParser;
import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
/**
* @throws IOException
*/
public MAPIMessage(POIFSFileSystem fs) throws IOException {
- this(fs.getRoot(), fs);
+ this(fs.getRoot());
+ }
+ /**
+ * Constructor for reading MSG Files from a POIFS filesystem
+ * @param fs
+ * @throws IOException
+ */
+ public MAPIMessage(NPOIFSFileSystem fs) throws IOException {
+ this(fs.getRoot());
+ }
+ /**
+ * @deprecated Use {@link #MAPIMessage(DirectoryNode)} instead
+ */
+ @Deprecated
+ public MAPIMessage(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException {
+ this(poifsDir);
}
/**
* Constructor for reading MSG Files from a certain
* @param fs
* @throws IOException
*/
- public MAPIMessage(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException {
+ public MAPIMessage(DirectoryNode poifsDir) throws IOException {
super(poifsDir);
// Grab all the chunks
import org.apache.poi.hsmf.datatypes.AttachmentChunks;
import org.apache.poi.hsmf.exceptions.ChunkNotFoundException;
import org.apache.poi.poifs.filesystem.DirectoryNode;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.util.StringUtil.StringsIterator;
public OutlookTextExtactor(MAPIMessage msg) {
super(msg);
}
+ /**
+ * Use {@link #OutlookTextExtactor(DirectoryNode)} instead
+ */
+ @Deprecated
public OutlookTextExtactor(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException {
this(new MAPIMessage(poifsDir, fs));
}
+ public OutlookTextExtactor(DirectoryNode poifsDir) throws IOException {
+ this(new MAPIMessage(poifsDir));
+ }
public OutlookTextExtactor(POIFSFileSystem fs) throws IOException {
this(new MAPIMessage(fs));
}
+ public OutlookTextExtactor(NPOIFSFileSystem fs) throws IOException {
+ this(new MAPIMessage(fs));
+ }
public OutlookTextExtactor(InputStream inp) throws IOException {
this(new MAPIMessage(inp));
}