Examples of writeFilesystem()


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

            s.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID);
            int codepage = Constants.CP_UNICODE;
            s.setProperty(PropertyIDMap.PID_CODEPAGE, Variant.VT_I2,
                          new Integer(codepage));
            poiFs.createDocument(ps1.toInputStream(), "Test");
            poiFs.writeFilesystem(out);
            out.close();

            /* Read back: */
            final POIFile[] psf = Util.readPropertySets(copy);
            Assert.assertEquals(1, psf.length);
View Full Code Here

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

            s.setFormatID(SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID);
            int codepage = 12345;
            s.setProperty(PropertyIDMap.PID_CODEPAGE, Variant.VT_I2,
                          new Integer(codepage));
            poiFs.createDocument(ps1.toInputStream(), "Test");
            poiFs.writeFilesystem(out);
            out.close();
            fail("This testcase did not detect the invalid codepage value.");
        }
        catch (IllegalPropertySetDataException ex)
        {
View Full Code Here

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

  currentUser.setCurrentEditOffset(newLastUserEditAtomPos.intValue());
  currentUser.writeToFS(outFS);


  // Send the POIFSFileSystem object out to the underlying stream
  outFS.writeFilesystem(out);
   }


  /**
   * Writes out a given ProperySet
View Full Code Here

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

    POIFSFileSystem pfs = new POIFSFileSystem();
    pfs.createDocument(new ByteArrayInputStream(mainBuf), "WordDocument");
    pfs.createDocument(new ByteArrayInputStream(tableBuf), "1Table");
    pfs.createDocument(new ByteArrayInputStream(dataBuf), "Data");

    pfs.writeFilesystem(out);
  }

  public CHPBinTable getCharacterTable()
  {
    return _cbt;
View Full Code Here

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

        if(preserveNodes) {
          copyNodes(filesystem, outFS, writtenEntries);
        }

        // Send the POIFSFileSystem object out to the underlying stream
        outFS.writeFilesystem(out);
    }


  /* ******************* adding methods follow ********************* */

 
View Full Code Here

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

    pfs.createDocument(new ByteArrayInputStream(mainBuf), "WordDocument");
    pfs.createDocument(new ByteArrayInputStream(tableBuf), "1Table");
    pfs.createDocument(new ByteArrayInputStream(dataBuf), "Data");
    writeProperties(pfs);

    pfs.writeFilesystem(out);
  }

  public CHPBinTable getCharacterTable()
  {
    return _cbt;
View Full Code Here

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

    {
        byte[] bytes = getBytes();
        POIFSFileSystem fs = new POIFSFileSystem();

        fs.createDocument(new ByteArrayInputStream(bytes), "Workbook");
        fs.writeFilesystem(stream);
    }

    /**
     * Method getBytes - get the bytes of just the HSSF portions of the XLS file.
     * Use this to construct a POI POIFSFileSystem yourself.
View Full Code Here

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

            excepts.add("WORKBOOK");

            // Copy over all the other nodes to our new poifs
            copyNodes(this.filesystem,fs,excepts);
        }
        fs.writeFilesystem(stream);
        //poifs.writeFilesystem(stream);
    }

    /**
     * Totals the sizes of all sheet records and eventually serializes them
View Full Code Here

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

            ps.write(psStream);
            psStream.close();
            final byte[] streamData = psStream.toByteArray();
            poiFs.createDocument(new ByteArrayInputStream(streamData),
                                 SummaryInformation.DEFAULT_STREAM_NAME);
            poiFs.writeFilesystem(out);
            out.close();
            Assert.fail("Should have thrown a NoFormatIDException.");
        }
        catch (Exception ex)
        {
View Full Code Here

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

        ps.write(psStream);
        psStream.close();
        final byte[] streamData = psStream.toByteArray();
        poiFs.createDocument(new ByteArrayInputStream(streamData),
                             SummaryInformation.DEFAULT_STREAM_NAME);
        poiFs.writeFilesystem(out);
        out.close();

        /* Read the POIFS: */
        final POIFSReader r = new POIFSReader();
        r.registerListener(new MyPOIFSReaderListener(),
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.