Javier
unread,May 28, 2011, 9:09:12 AM5/28/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
What is the correct way if storing binary data using Java driver?
If I put a byte[] in a DBObject, the data is encoded in the depecated
way (the one with subtype 2)
If I put a Binary with subtype 0, the data is encoded correctly but it
is decoded to a byte[] instead of a Binary.
If I put a Binary with user-defined subtype (80), the data is encoded
correctly and decoded to a Binary object.
The third one seems the way to go, but I'm not sure if setting user-
defined subtype for something that is general binary data is correct.
Any hints?
Many thanks