• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
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
 
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).
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!