FileInputStream fstream = new FileInputStream(someFile.getPath());
DataInputStream in = new DataInputStream(fstream);
如果我调用in.close(),它还会关闭fstream吗?我的代码给出了GC Exception,如下所示:
java.lang.OutOfMemoryError:超出了GC开销限制
是的,DataInputStream.close()也会
关闭您的FileInputStream.
原文链接:https://www.f2er.com/java/120403.html