I have a Java application that persists byte[] structures to a DB (using Hibernate). I'm writing a C++ application that reads these structures at a later time.
As you might expect, I'm having problems.... The byte[] structure written to the DB is longer than the original number of bytes - 27 bytes, by the looks of things.
Is there a way of determining (in C++) the byte[] header structure to properly find the beginning of the true data?
I spent some time looking at the JNI source code (GetArrayLength(jbytearray), etc.) to determine how that works, but got quickly mired in the vagaries of JVM code. yuck...
Ideas?
byte[]nor any idea of any structure. It would help if you'd give us a better description of the array, any regularities it might have, and a sample before and after.