• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Vs ByteArrayInputStream

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Writing the content to a file on disk certainly will be slower than the pure in-memory solution.
 
reply
    Bookmark Topic Watch Topic
  • New Topic