Examples of toInputStream()


Examples of com.alibaba.citrus.util.io.ByteArrayOutputStream.toInputStream()

        ObjectOutputStream oos = new ObjectOutputStream(baos);

        oos.writeObject(cart);
        oos.close();

        ObjectInputStream ois = new ObjectInputStream(baos.toInputStream());

        try {
            return (Cart) ois.readObject();
        } finally {
            ois.close();
View Full Code Here

Examples of com.alibaba.simpleimage.io.ByteArrayOutputStream.toInputStream()

        ByteArrayOutputStream temp = new ByteArrayOutputStream();
        IOUtils.copy(inputStream, temp);
        IOUtils.closeQuietly(inputStream);

        InputStream img = temp.toInputStream();
        temp = null;

        System.out.println("***********Performance Test**************");

        for (int i = 0; i < frequency; i++) {
View Full Code Here

Examples of com.alibaba.simpleimage.io.ByteArrayOutputStream.toInputStream()

    public static InputStream createMemoryStream(InputStream input) throws IOException {
        if ((!(input instanceof ByteArrayInputStream)) && (!(input instanceof java.io.ByteArrayInputStream))) {
            ByteArrayOutputStream temp = new ByteArrayOutputStream();
            IOUtils.copy(input, temp);

            input = temp.toInputStream();
            temp = null;
        }

        return input;
    }
View Full Code Here

Examples of com.alibaba.simpleimage.io.ByteArrayOutputStream.toInputStream()

        ByteArrayOutputStream temp = new ByteArrayOutputStream();
        IOUtils.copy(inputStream, temp);
        IOUtils.closeQuietly(inputStream);

        InputStream img = temp.toInputStream();
        temp = null;

        System.out.println("***********Scale Performance Test**************");
        long start = 0L, end = 0L, total = 0L;

View Full Code Here

Examples of com.caucho.quercus.env.StringValue.toInputStream()

    StringValue inputData = env.getInputData();
   
    if (inputData == null)
      inputData = env.getEmptyString();
   
    init(new ReadStream(new VfsStream(inputData.toInputStream(), null)));
  }
 
  public String toString()
  {
    return "PhpBinaryInput[]";
View Full Code Here

Examples of com.caucho.quercus.env.Value.toInputStream()

                              StringValue format,
                              Value []args)
  {
    Value value = sprintf(env, format, args);

    return FileModule.fwrite(env, os, value.toInputStream(),
                             Integer.MAX_VALUE);
  }

  /**
   * implodes an array into a string
View Full Code Here

Examples of com.puppetlabs.graph.utils.ByteArrayOutputStream2.toInputStream()

    ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000);

    ByteArrayOutputStream2 out = new ByteArrayOutputStream2();

    graphProducer.produceGraph(cancel, catalogName, oldCatalog, oldRoot, newCatalog, newRoot, out);
    graphProducer.getSVGProducer().produceSVG(out.toInputStream(false), svgStream, false, //
    ticker.newChild(IProgressMonitor.UNKNOWN));
  }

  @Deprecated
  public void produceSVGGraph(String catalogName, InputStream catalogStream, OutputStream svgStream,
View Full Code Here

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

            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);
            dinfDoc = (DocumentNode)root.getEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
View Full Code Here

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

        p.setType(Variant.VT_LPWSTR);
        p.setValue(AUTHOR);
        si.setProperty(p);
        si.setProperty(PropertyIDMap.PID_TITLE, Variant.VT_LPSTR, TITLE);
   
        poiFs.createDocument(ps.toInputStream(),
                             SummaryInformation.DEFAULT_STREAM_NAME);
        poiFs.writeFilesystem(out);
        out.close();
   
        /* Read the POIFS: */
 
View Full Code Here

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

        final MutableSection s2 = new MutableSection();
        s2.setFormatID(formatID);
        s2.setProperty(2, SECTION2);
        ps.addSection(s2);

        poiFs.createDocument(ps.toInputStream(), STREAM_NAME);
        poiFs.writeFilesystem(out);
        out.close();

        /* Read the POIFS: */
        final PropertySet[] psa = new PropertySet[1];
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.