码迷,mamicode.com
首页 > 编程语言 > 详细

java.io.IOException: The stream is closed

时间:2015-06-17 13:28:46      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:stream   source   unknown   

java.io.IOException: The stream is closed
at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read(ZipArchiveInputStream.java:362)
at java.io.InputStream.read(Unknown Source)
at org.apache.commons.compress.utils.IOUtils.copy(IOUtils.java:75)
at org.apache.commons.compress.utils.IOUtils.copy(IOUtils.java:56)
at com.xunge.AESFileEncoder.unzip(AESFileEncoder.java:175)
at com.xunge.AESFileEncoder.unzip(AESFileEncoder.java:94)
at com.xunge.AESFileEncoder.main(AESFileEncoder.java:476)
java.io.IOException: This archive contains unclosed entries.
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.finish(ZipArchiveOutputStream.java:410)
at com.xunge.AESFileEncoder.unzip(AESFileEncoder.java:98)
at com.xunge.AESFileEncoder.main(AESFileEncoder.java:476)

相关代码:

ArchiveInputStream inJar = new ArchiveStreamFactory()
                            .createArchiveInputStream(ArchiveStreamFactory.JAR,
                                    ais);

需要注意的是,使用ArchiveInputStream创建的ArchiveInputStream 对象如果关闭,则所有与之相关的ArchiveInputStream 对象就都被关闭了。

java.io.IOException: The stream is closed

标签:stream   source   unknown   

原文地址:http://blog.csdn.net/testcs_dn/article/details/46532239

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!