collection usage - must be supported */ GridFS myFS = new GridFS(myDatabase); // returns a default GridFS (e.g. "fs" root collection) myFS.storeFile(new File("/tmp/largething.mpg")); // saves the file into the "fs" GridFS store /* * specified root collection usage - optional */ GridFS myContracts = new GridFS(myDatabase, "contracts"); // returns a GridFS where "contracts" is root myFS.retrieveFile("smithco", new File("/tmp/smithco_20090105.pdf")); // retrieves object whose filename is "smithco" http://www.mongodb.org/display/DOCS/GridFS