Package org.apache.poi.poifs.filesystem

Examples of org.apache.poi.poifs.filesystem.POIFSFileSystem.createDocumentInputStream()


        try
        {
            POIFSFileSystem fs =
                    new POIFSFileSystem(new FileInputStream(filename));
            InputStream stream =
                    fs.createDocumentInputStream("Workbook");
            Record[] records = createRecords(stream, dump);
        } catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here


            if ((args.length > 1) && args[1].equals("bfd"))
            {
                POIFSFileSystem fs =
                        new POIFSFileSystem(new FileInputStream(args[0]));
                InputStream stream =
                        fs.createDocumentInputStream("Workbook");
                int size = stream.available();
                byte[] data = new byte[size];

                stream.read(data);
                HexDump.dump(data, 0, System.out, 0);
View Full Code Here

   public void test54233() throws Exception {
       DocumentInputStream dis;
       POIFSFileSystem fs =
               new POIFSFileSystem(_samples.openResourceAsStream("TestNon4ByteBoundary.doc"));
      
       dis = fs.createDocumentInputStream(SummaryInformation.DEFAULT_STREAM_NAME);
       SummaryInformation si = (SummaryInformation)PropertySetFactory.create(dis);
      
       dis = fs.createDocumentInputStream(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
       DocumentSummaryInformation dsi = (DocumentSummaryInformation)PropertySetFactory.create(dis);
     
View Full Code Here

               new POIFSFileSystem(_samples.openResourceAsStream("TestNon4ByteBoundary.doc"));
      
       dis = fs.createDocumentInputStream(SummaryInformation.DEFAULT_STREAM_NAME);
       SummaryInformation si = (SummaryInformation)PropertySetFactory.create(dis);
      
       dis = fs.createDocumentInputStream(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
       DocumentSummaryInformation dsi = (DocumentSummaryInformation)PropertySetFactory.create(dis);
     
       // Test
       assertEquals("Microsoft Word 10.0", si.getApplicationName());
       assertEquals("", si.getTitle());
View Full Code Here

    doc.readProperties();
    doc.writeProperties(outFS);

    // Should now hold them
    assertNotNull(
        outFS.createDocumentInputStream("\005SummaryInformation")
    );
    assertNotNull(
        outFS.createDocumentInputStream("\005DocumentSummaryInformation")
    );
  }
View Full Code Here

    // Should now hold them
    assertNotNull(
        outFS.createDocumentInputStream("\005SummaryInformation")
    );
    assertNotNull(
        outFS.createDocumentInputStream("\005DocumentSummaryInformation")
    );
  }

  public void testWriteReadProperties() throws Exception {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

    {
        POIFSFileSystem fs      =
            new POIFSFileSystem(new FileInputStream(file));
        List            records =
            RecordFactory
                .createRecords(fs.createDocumentInputStream("Workbook"));

        for (int k = 0; k < records.size(); k++)
        {
            Record record = ( Record ) records.get(k);
View Full Code Here

    public void run() {
        try {
            POIFSFileSystem fs =
                    new POIFSFileSystem(new FileInputStream(filename));
            InputStream stream =
                    fs.createDocumentInputStream("Workbook");
            Record[] records = createRecords(stream, dump);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

            }
            if ((args.length > 1) && args[1].equals("bfd")) {
                POIFSFileSystem fs =
                        new POIFSFileSystem(new FileInputStream(args[0]));
                InputStream stream =
                        fs.createDocumentInputStream("Workbook");
                int size = stream.available();
                byte[] data = new byte[size];

                stream.read(data);
                HexDump.dump(data, 0, System.out, 0);
View Full Code Here

    public void run()
        throws IOException
    {
        FileInputStream fin   = new FileInputStream(infile);
        POIFSFileSystem poifs = new POIFSFileSystem(fin);
        InputStream     din   = poifs.createDocumentInputStream("Workbook");
        HSSFRequest     req   = new HSSFRequest();

        req.addListenerForAllRecords(new EFHSSFListener(this));
        HSSFEventFactory factory = new HSSFEventFactory();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.