Read from mongo and ByteStorageService.
Read from mongo and ByteStorageService. This will return a tuple that contains metadata of the file as well as inputstream to the bytes.
Remove from mongo and ByteStorageService.
Remove from mongo and ByteStorageService. This will return the metadata from mongo and the bytes from ByteStorageService.
Write the inputstream to mongo and ByteStorageService.
Write the inputstream to mongo and ByteStorageService. Any extra values to be written can be stored in extra. The values need to be able to be converted to DBObject.
Object used to read/write/delete from mongo. This object is aware of ByteStorageService. It will use mongo for the metadta of the file, and the ByteStorageService for the bytes. If either the ByteStorageService is set to MongoDBByteStorage or the useMongoProperty is set to true it will use mongo for the bytes as well (without going through ByteStorageService).
This code is aware of an issue with Casbah, Joda (see JIRA: https://opensource.ncsa.illinois.edu/jira/browse/MMDB-1573).