Search in sources :

Example 1 with PointerFactory

use of org.apache.poi.hdgf.pointers.PointerFactory in project poi by apache.

the class TestStreamBugs method setUp.

@Before
public void setUp() throws IOException {
    ptrFactory = new PointerFactory(11);
    chunkFactory = new ChunkFactory(11);
    InputStream is = POIDataSamples.getDiagramInstance().openResourceAsStream("44594.vsd");
    filesystem = new POIFSFileSystem(is);
    is.close();
    // Grab the document stream
    InputStream is2 = filesystem.createDocumentInputStream("VisioDocument");
    contents = IOUtils.toByteArray(is2);
    is2.close();
}
Also used : InputStream(java.io.InputStream) POIFSFileSystem(org.apache.poi.poifs.filesystem.POIFSFileSystem) PointerFactory(org.apache.poi.hdgf.pointers.PointerFactory) ChunkFactory(org.apache.poi.hdgf.chunks.ChunkFactory) Before(org.junit.Before)

Example 2 with PointerFactory

use of org.apache.poi.hdgf.pointers.PointerFactory in project poi by apache.

the class TestStreamComplex method setUp.

@Before
public void setUp() throws IOException {
    ptrFactory = new PointerFactory(11);
    chunkFactory = new ChunkFactory(11);
    InputStream is = POIDataSamples.getDiagramInstance().openResourceAsStream("Test_Visio-Some_Random_Text.vsd");
    POIFSFileSystem filesystem = new POIFSFileSystem(is);
    is.close();
    // Grab the document stream
    InputStream is2 = filesystem.createDocumentInputStream("VisioDocument");
    contents = IOUtils.toByteArray(is2);
    is2.close();
    filesystem.close();
}
Also used : InputStream(java.io.InputStream) POIFSFileSystem(org.apache.poi.poifs.filesystem.POIFSFileSystem) PointerFactory(org.apache.poi.hdgf.pointers.PointerFactory) ChunkFactory(org.apache.poi.hdgf.chunks.ChunkFactory) Before(org.junit.Before)

Aggregations

InputStream (java.io.InputStream)2 ChunkFactory (org.apache.poi.hdgf.chunks.ChunkFactory)2 PointerFactory (org.apache.poi.hdgf.pointers.PointerFactory)2 POIFSFileSystem (org.apache.poi.poifs.filesystem.POIFSFileSystem)2 Before (org.junit.Before)2