Package org.apache.commons.io.output

Examples of org.apache.commons.io.output.ByteArrayOutputStream.toByteArray()


    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here


    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here

    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here

    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here

    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here

    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  /**
   * @throws IllegalAccessException
   * @throws IOException
View Full Code Here

    setInfo.setOut(baos);
   
    // 将需要导出的数据输出到baos
    ExcelUtil.export2Excel(setInfo);
   
    return new ByteArrayInputStream(baos.toByteArray());
  }

  public String downXls() throws Exception
  {
    return SUCCESS;
View Full Code Here

        if (!skipAfter(in, PACKET_TRAILER, baout)) {
            throw new IOException("XMP packet not properly terminated!");
        }

        Metadata metadata = XMPParser.parseXMP(
                new StreamSource(new ByteArrayInputStream(baout.toByteArray())));
        return metadata;
    }

    private static boolean skipAfter(InputStream in, byte[] match) throws IOException {
        return skipAfter(in, match, null);
View Full Code Here

                    log.error("Error while aligning ICC stream: " + ex.getMessage(), ex);
                    return false;
                }
            }
            try {
                iccProfile = ICC_Profile.getInstance(iccStream.toByteArray());
            } catch (IllegalArgumentException iae) {
                log.warn("An ICC profile is present but it is invalid ("
                        + iae.getMessage() + "). The color profile will be ignored. ("
                        + this.getOriginalURI() + ")");
            }
View Full Code Here

            //Convert the decoded bitmaps to a BufferedImage
            BufferedImage bufImage = createBufferedImageFromBitmaps(fopImage);
            ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor("image/png");
            ByteArrayOutputStream baout = new ByteArrayOutputStream();
            writer.writeImage(bufImage, baout);
            rawData = baout.toByteArray();
        }
        if (rawData == null) {
            log.warn(FONode.decorateWithContextInfo("Image could not be embedded: "
                    + fopImage.getOriginalURI(), abstractGraphic));
            return;
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.