Package org.apache.wicket.util.io

Examples of org.apache.wicket.util.io.ByteArrayOutputStream


  protected byte[] getExporterData(JasperPrint print,
      JRAbstractExporter exporter) throws JRException
  {
    // prepare a stream to trap the exporter's output
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);

    // execute the export and return the trapped result
    exporter.exportReport();

    return baos.toByteArray();
  }
View Full Code Here


  protected byte[] getExporterData(JasperPrint print, JRAbstractExporter exporter)
    throws JRException
  {
    // prepare a stream to trap the exporter's output
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);

    // execute the export and return the trapped result
    exporter.exportReport();

    return baos.toByteArray();
  }
View Full Code Here

    {
      @Override
      public void writeData(final Attributes attributes)
      {
        InputStream inputStream = null;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try
        {
          inputStream = webExternalResourceStream.getInputStream();
          Streams.copy(inputStream, baos);
          attributes.getResponse().write(baos.toByteArray());
        }
        catch (ResourceStreamNotFoundException rsnfx)
        {
          throw new WicketRuntimeException(rsnfx);
        }
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.io.ByteArrayOutputStream

Copyright © 2018 www.massapicom. 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.