看起来您需要:
http://commons.apache.org/io/apidocs/org/apache/commons/io/input/CloseShieldInputStream.html
在制作读者之前,先将System.in环绕起来,然后一切都会好起来的,因为使用FileInputStream时不会这样做。

看起来您需要:
http://commons.apache.org/io/apidocs/org/apache/commons/io/input/CloseShieldInputStream.html
在制作读者之前,先将System.in环绕起来,然后一切都会好起来的,因为使用FileInputStream时不会这样做。