title: "java.io.StreamCorruptedException: invalid stream header: 3C3F786D" while trying to merge more than one sub-report in a master-report
body: <p>I want to merge more than one sub-report into a master report using jasper report and spring boot in java, but not able to merge the sub-report into master report.while the below code works for me, if there is only one report. </p>
  
  <pre><code>report[0] = "/reports/subreport1.jrxml";
  report[1] = "/reports/master1.jrxml";
  JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(productService.report());
  for(int i =0 ;i&lt;=1;i++)
  {
      inputStream[i] = this.getClass().getResourceAsStream(report[i]);
      jasperReport[i] = JasperCompileManager.compileReport(inputStream[i]);
      jasperPrint[i] = JasperFillManager.fillReport(jasperReport[i], null, dataSource);
      HtmlExporter exporter = new HtmlExporter(DefaultJasperReportsContext.getInstance());
      exporter.setExporterInput(new SimpleExporterInput(jasperPrint[i]));
      exporter.setExporterOutput(new SimpleHtmlExporterOutput(response.getWriter()));
      exporter.exportReport();
  }
  </code></pre>
  
  <p>getting error as "java.io.StreamCorruptedException : invalid stream header: 3C3F786D"</p>