aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to Cache the file stream data in Java using normal POJO. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to Cache the file stream data in Java using normal POJO." Watch "How to Cache the file stream data in Java using normal POJO." New topic
Author

How to Cache the file stream data in Java using normal POJO.

paresh doshi
Ranch Hand

Joined: Nov 20, 2006
Posts: 81
Hi,

I have a jar file that reads the XSD file and parse the input XML through that every time. Can if be possible to load all the XSD files in Cache at once, and every request to that jar file will pick up the data from Cache, so that the performance is improved to a great extent.

Can anyone provide some idea or sample code.

Regards,
Paras.


Thanks.<br />Paresh Doshi<br />SCJP 1.4
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18127
    
    8

If I had to do that, I would write an EntityResolver that cached the schemas. Probably as DOM objects so they didn't have to be parsed over and over, but that would be expanding the time versus memory trade-off more.
 
jQuery in Action, 2nd edition
 
subject: How to Cache the file stream data in Java using normal POJO.
 
Similar Threads
disk cache for JAR files when running plugin
XMLBeans
Applet getResource() from Server or Client?
Improving performance in Pagination
XML Schema in a jar file?