Example #1
0
  /**
   * 从zip流中,抽取文件,并返回stream
   *
   * @param isZip
   * @param fileName
   * @return
   */
  public static ZipInputStream getFileStreamFromStream(InputStream isZip, String fileName) {
    // ZipInputStream zis = getFileStreamFromZip(zipFileName, fileName);
    File zFile = StreamUtils.StreamToTempFile(isZip);

    return getFileStreamFromZip(zFile.getPath(), fileName);
  }
Example #2
0
  /**
   * 根据输入流,生成zipfile对象
   *
   * @param isZip
   * @return
   * @throws ZipException
   */
  public static ZipFile genZipFileFromStream(InputStream isZip) throws ZipException {

    return new ZipFile(StreamUtils.StreamToTempFile(isZip));
  }