I’m using Xerces library for parsing XML. Here is the code snippet for parsing:
Document doc = builder.parse(new InputSource(new StringReader(someXMLString)));
Do I need to close the InputStream in InputSource manually or will the parse method handle it?
It seems there is nothing in DocumentBuilder API about it. We can test it as
it prints
close. But since there’s nothing in API about it, this behaviour is not guaranteed.