所以我有创建ZipInputStream所需的这个FileInputStream ,我想知道如果FileInputStream关闭, ZipInputStream会发生什么。考虑以下代码:
public void Foo(File zip) throws ZipException{
ZipInputStream zis;
FileInputStream fis = new FileInputStream(zip);
try{
zis = new ZipInputStream(fis);
} catch (FileNotFoundException ex) {
throw new ZipException("Error opening ZIP file for reading", ex);
} finally {
if(fis != null){ fis.close();
}
}
zis remais开门吗?ZipInputStream 对象会发生什么?有没有办法可以测试这个?