本文整理了Java中org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>()
方法的一些代码示例,展示了ZipInputStreamZipEntrySource.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipInputStreamZipEntrySource.<init>()
方法的具体详情如下:
包路径:org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource
类名称:ZipInputStreamZipEntrySource
方法名:<init>
[英]Reads all the entries from the ZipInputStream into memory, and closes the source stream. We'll then eat lots of memory, but be able to work with the entries at-will.
[中]将ZipInputStream中的所有条目读取到内存中,并关闭源流。然后,我们将消耗大量内存,但能够随意处理条目。
代码示例来源:origin: org.apache.poi/poi-ooxml
private static ZipEntrySource openZipEntrySourceStream(ZipArchiveThresholdInputStream zis) throws InvalidOperationException {
// Acquire the final level resource. If this is acquired successfully, the zip package was read successfully from the input stream
try {
// open the zip entry source stream
return new ZipInputStreamZipEntrySource(zis);
} catch (IOException e) {
throw new InvalidOperationException("Could not open the specified zip entry source stream", e);
}
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Constructor. Opens a Zip based Open XML document from
* an InputStream.
*
* @param in
* Zip input stream to load.
* @param access
* The package access mode.
* @throws IllegalArgumentException
* If the specified input stream not an instance of
* ZipInputStream.
* @throws IOException
* if input stream cannot be opened, read, or closed
*/
ZipPackage(InputStream in, PackageAccess access) throws IOException {
super(access);
ZipArchiveThresholdInputStream zis = ZipHelper.openZipStream(in); // NOSONAR
try {
this.zipArchive = new ZipInputStreamZipEntrySource(zis);
} catch (final IOException e) {
IOUtils.closeQuietly(zis);
throw e;
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Constructor. <b>Operation not supported.</b>
*
* @param in
* Zip input stream to load.
* @param access
* @throws IllegalArgumentException
* If the specified input stream not an instance of
* ZipInputStream.
*/
ZipPackage(InputStream in, PackageAccess access) throws IOException {
super(access);
this.zipArchive = new ZipInputStreamZipEntrySource(
new ZipInputStream(in)
);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private static ZipEntrySource openZipEntrySourceStream(ZipArchiveThresholdInputStream zis) throws InvalidOperationException {
// Acquire the final level resource. If this is acquired successfully, the zip package was read successfully from the input stream
try {
// open the zip entry source stream
return new ZipInputStreamZipEntrySource(zis);
} catch (IOException e) {
throw new InvalidOperationException("Could not open the specified zip entry source stream", e);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Constructor. Opens a Zip based Open XML document from
* an InputStream.
*
* @param in
* Zip input stream to load.
* @param access
* The package access mode.
* @throws IllegalArgumentException
* If the specified input stream not an instance of
* ZipInputStream.
* @throws IOException
* if input stream cannot be opened, read, or closed
*/
ZipPackage(InputStream in, PackageAccess access) throws IOException {
super(access);
ZipArchiveThresholdInputStream zis = ZipHelper.openZipStream(in); // NOSONAR
try {
this.zipArchive = new ZipInputStreamZipEntrySource(zis);
} catch (final IOException e) {
IOUtils.closeQuietly(zis);
throw e;
}
}
内容来源于网络,如有侵权,请联系作者删除!