Question about byte[] keys/records

Jul 11, 2013 at 2:18 PM
Greatings. I want to ask the following question:

I have keys and records of type byte[]. The keys length varies from 8-128 bytes. How can I insert them in RaptorDB and read them in big endian ordered way? Can you provide a simple code snippet?
Jul 13, 2013 at 3:29 PM
Hi Kris!

Sorry for the delay, the internal workings of RaptorDB works with bytes without problem, the only hitch is that you can't use byte[] instead of the T in the generic versions since byte[] doesn't support GetHashCode() and Equals() properly, I remember creating a class to encapsulate byte[] values for this which you can do also (see the source for versions before 1.6).

Another approach is to convert your keys to strings and use that.