Example code on how to generate bson files with java that can be used with the mongorestore utility.