• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Vs ByteArrayInputStream

 
Meghana Reddy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
1) I am using a ByteArrayInputStream as InputSource for the SAXParser.parse method for XML Parsing.
2) The other way I can do this is to create a file and write the XML string into the file and pass the file object as InputSource to the SAXParser.
The SAXParser i am using is xerces.jar
Any idea on wht r the pros and cons of performance in both the scenarios 1 & 2.
Thnks in adv
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Writing the content to a file on disk certainly will be slower than the pure in-memory solution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!