File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Spring in Action this week in the Spring forum!
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: 18651
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Cache the file stream data in Java using normal POJO.