What is the difference between using InputSource and InputStream when I am parsing xml. I saw both examples in some tutorials
without InputSource:
InputStream is;
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbFactory.newDocumentBuilder();
Document document = db.parse(is);
and with InputSource, where is the difference
DocumentBuilder db = dbFactory.newDocumentBuilder();
InputSource inputSource = new InputSource(is);
Document document = db.parse(inputSource);
So is there any difference in performance? Or in something else?