I have a java.util.BitSet array that I want to store in my database, but I don't know how best to do this. To be precise, I got x*y true or false for every record I want to keep. I hardt java.util.BitSet is a good call, but I really don't know how I can store it in the database.
I am using a MySQL database with hibernation (with annotation).
This is how I initialize my map:
Bitset[] map = new BitSet[x]; for (int i = 0; i < x; i++) { map[i] = new BitSet(y); }
Update:
There is no relation in this data set, and the problem is that I have tons of these "2-dimensional arrays", and one part is about 360 * 180.
I also tried to make an image from it, to make a simple monochrome pbm file. But still, the data is not in the database, and every time the processing of the saved “image” file is redundant, I think it is a slow process.
Sorex source share