本文整理了Java中org.apache.poi.openxml4j.util.ZipEntrySource.getInputStream()
方法的一些代码示例,展示了ZipEntrySource.getInputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipEntrySource.getInputStream()
方法的具体详情如下:
包路径:org.apache.poi.openxml4j.util.ZipEntrySource
类名称:ZipEntrySource
方法名:getInputStream
[英]Returns an InputStream of the decompressed data that makes up the entry
[中]返回组成条目的解压缩数据的InputStream
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Implementation of the getInputStream() which return the inputStream of
* this part zip entry.
*
* @return Input stream of this part zip entry.
*/
@Override
protected InputStream getInputStreamImpl() throws IOException {
// We use the getInputStream() method from java.util.zip.ZipFile
// class which return an InputStream to this part zip entry.
return ((ZipPackage) _container).getZipArchive()
.getInputStream(zipEntry);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
zipArchive.getInputStream(contentTypeEntry), this);
} catch (IOException e) {
throw new InvalidFormatException(e.getMessage(), e);
代码示例来源:origin: org.apache.poi/poi-ooxml
zeOut.setTime(ze.getTime());
zos.putArchiveEntry(zeOut);
try (final InputStream is = zipEntrySource.getInputStream(ze)) {
if (is instanceof ZipArchiveThresholdInputStream) {
代码示例来源:origin: org.apache.poi/poi-ooxml
if (context.getZipEntry() != null) {
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(context.getZipEntry());
} else if (context.getPackage() != null) {
.getPackage());
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(zipEntry);
} else
throw new IOException(
代码示例来源:origin: apache/tika
private static InputStream getZipStream(String zipPath, ZipPackage zipPackage) throws IOException, TikaException {
String targPath = (zipPath.length() > 1 && zipPath.startsWith("/") ? zipPath.substring(1) : zipPath);
ZipEntrySource zipEntrySource = zipPackage.getZipArchive();
Enumeration<? extends ZipArchiveEntry> zipEntryEnumeration = zipEntrySource.getEntries();
ZipArchiveEntry zipEntry = null;
while (zipEntryEnumeration.hasMoreElements()) {
ZipArchiveEntry ze = zipEntryEnumeration.nextElement();
if (ze.getName().equals(targPath)) {
zipEntry = ze;
break;
}
}
if (zipEntry == null) {
throw new TikaException("Couldn't find required zip entry: " + zipPath);
}
return zipEntrySource.getInputStream(zipEntry);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Implementation of the getInputStream() which return the inputStream of
* this part zip entry.
*
* @return Input stream of this part zip entry.
*/
@Override
protected InputStream getInputStreamImpl() throws IOException {
// We use the getInputStream() method from java.util.zip.ZipFile
// class which return an InputStream to this part zip entry.
return ((ZipPackage) _container).getZipArchive()
.getInputStream(zipEntry);
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Implementation of the getInputStream() which return the inputStream of
* this part zip entry.
*
* @return Input stream of this part zip entry.
*/
@Override
protected InputStream getInputStreamImpl() throws IOException {
// We use the getInputStream() method from java.util.zip.ZipFile
// class which return an InputStream to this part zip entry.
return ((ZipPackage) _container).getZipArchive()
.getInputStream(zipEntry);
}
代码示例来源:origin: org.apache.tika/tika-parsers
private static InputStream getZipStream(String zipPath, ZipPackage zipPackage) throws IOException, TikaException {
String targPath = (zipPath.length() > 1 && zipPath.startsWith("/") ? zipPath.substring(1) : zipPath);
ZipEntrySource zipEntrySource = zipPackage.getZipArchive();
Enumeration<? extends ZipArchiveEntry> zipEntryEnumeration = zipEntrySource.getEntries();
ZipArchiveEntry zipEntry = null;
while (zipEntryEnumeration.hasMoreElements()) {
ZipArchiveEntry ze = zipEntryEnumeration.nextElement();
if (ze.getName().equals(targPath)) {
zipEntry = ze;
break;
}
}
if (zipEntry == null) {
throw new TikaException("Couldn't find required zip entry: " + zipPath);
}
return zipEntrySource.getInputStream(zipEntry);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
zipArchive.getInputStream(contentTypeEntry), this);
} catch (IOException e) {
throw new InvalidFormatException(e.getMessage(), e);
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
try {
this.contentTypeManager = new ZipContentTypeManager(
getZipArchive().getInputStream(entry), this);
} catch (IOException e) {
throw new InvalidFormatException(e.getMessage());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
zeOut.setTime(ze.getTime());
zos.putArchiveEntry(zeOut);
try (final InputStream is = zipEntrySource.getInputStream(ze)) {
if (is instanceof ZipArchiveThresholdInputStream) {
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
if (context.getZipEntry() != null) {
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(context.getZipEntry());
} else if (context.getPackage() != null) {
.getPackage());
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(zipEntry);
} else
throw new IOException(
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
if (context.getZipEntry() != null) {
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(context.getZipEntry());
} else if (context.getPackage() != null) {
.getPackage());
in = ((ZipPackage) context.getPackage()).getZipArchive()
.getInputStream(zipEntry);
} else
throw new IOException(
内容来源于网络,如有侵权,请联系作者删除!