How to efficiently manage files on a filesystem in Java?
Posted
by Tuukka Mustonen
on Stack Overflow
See other posts from Stack Overflow
or by Tuukka Mustonen
Published on 2010-06-11T11:08:28Z
Indexed on
2010/06/11
11:12 UTC
Read the original article
Hit count: 305
I am creating a few JAX-WS endpoints, for which I want to save the received and sent messages for later inspection. To do this, I am planning to save the messages (XML files) into filesystem, in some sensible hierarchy. There will be hundreds, even thousands of files per day. I also need to store metadata for each file.
I am considering to put the metadata (just a couple of fields) into database table, but the XML file content itself into files in a filesystem in order not to bloat the database with content data (that is seldomly read).
Is there some simple library that helps me in saving, loading, deleting etc. the files? It's not that tricky to implement it myself, but I wonder if there are existing solutions? Just a simple library that already provides easy access to filesystem (preferrably over different operating systems).
Or do I even need that, should I just go with raw/custom Java?
© Stack Overflow or respective owner