BufferedReader and InputStreamReader both close the underlying stream when they are closed. You should be fine by closing stdError
Guillaume
2010-04-17 10:27:50
BufferedReader and InputStreamReader both close the underlying stream when they are closed. You should be fine by closing stdError
What happens when an exception is thrown while creating the BufferedReader
object? The stream managed by the InputStreamReader
object is not closed until some time in the future when the garbage collector decides to destroy the object.
You will likely have similar problems if an exception is thrown while creating the InputStreamReader
object.