Skip to content
Advertisement

The Properties.load would close the InputStream?

I saw this example, and I didn’t see the close() method invoked on the InputStream, so would prop.load() close the stream automatically? Or is there a bug in the example?

Advertisement

Answer

The Stream is not closed after Properties.load ()

JavaScript

The above code returns “-1” so the stream is not closed. Otherwise it should have thrown java.io.IOException: Stream Closed

Advertisement