• Post Reply Bookmark Topic Watch Topic
  • New Topic

which java Collection is suitable to store a big Files(Directory) ?  RSS feed

 
benny rusli
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello People,
I want to compare two Directory, which have a big capacity about 1 GB(until 20 GB) for one Directory, what should i do to make the code effectively ? Should i use Vector or another Java Collection(Set,List,Map,HashMap,etc) to store the Files temporary. The Files come from another network. I need any Hint or Idea, thanks
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're not going to get away with storing the entire content of the directories.
You may be able to get away with storing the file names and maybe a few attributes like file size and last modification date (depending on how many files there are this is likely possible).
 
a gup
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to compare directory listings or the entire directory contents as well?

If you want to compare directory listings, I would suggest parse the input into a sorted tree (sort element can be level), and then compare the trees.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!