Examples of toInputStream()


Examples of org.apache.poi.hpsf.SummaryInformation.toInputStream()

        //(a piece of code that used to work up to POI 3.0.2)
        SummaryInformation summary1 = (SummaryInformation)PropertySetFactory.create(fs.createDocumentInputStream(SummaryInformation.DEFAULT_STREAM_NAME));
        summary1.setTitle(title);
        //write the modified property back to POIFS
        fs.getRoot().getEntry(SummaryInformation.DEFAULT_STREAM_NAME).delete();
        fs.createDocument(summary1.toInputStream(), SummaryInformation.DEFAULT_STREAM_NAME);

        //save the workbook and read the property
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        wb.write(out);
        out.close();
View Full Code Here

Examples of org.apache.poi.hpsf.SummaryInformation.toInputStream()

        //set POIFS properties before constructing HSSFWorkbook
        SummaryInformation summary1 = (SummaryInformation)PropertySetFactory.create(fs.createDocumentInputStream(SummaryInformation.DEFAULT_STREAM_NAME));
        summary1.setTitle(title);

        fs.getRoot().getEntry(SummaryInformation.DEFAULT_STREAM_NAME).delete();
        fs.createDocument(summary1.toInputStream(), SummaryInformation.DEFAULT_STREAM_NAME);

        HSSFWorkbook wb = new HSSFWorkbook(fs);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        wb.write(out);
View Full Code Here

Examples of org.apache.poi.hpsf.SummaryInformation.toInputStream()

            assertEquals("", dinf.getCompany());
            assertEquals(null, dinf.getManager());
           
           
            // Do an in-place replace via an InputStream
            new NPOIFSDocument(sinfDoc).replaceContents(sinf.toInputStream());
            new NPOIFSDocument(dinfDoc).replaceContents(dinf.toInputStream());
           
           
            // Check it didn't get changed
            sinfDoc = (DocumentNode)root.getEntry(SummaryInformation.DEFAULT_STREAM_NAME);
View Full Code Here

Examples of org.luaj.vm2.LuaString.toInputStream()

      }
      case 6: // "loadstring", // ( string [,chunkname] ) -> chunk | nil, msg
      {
        LuaString script = args.checkstring(1);
        String chunkname = args.optjstring(2, "string");
        return BaseLib.loadStream(script.toInputStream(),chunkname);
      }
      case 7: // "pcall", // (f, arg1, ...) -> status, result1, ...
      {
        LuaValue func = args.checkvalue(1);
        LuaThread.onCall(this);
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.