JBuffer.getByteArray(byte[]) nearly always throws an ArrayINdexOutOfBounds exception. This is a native method and implementation seems to have a problem.
Fixed in rc6. As a work around, do not use the index parameter and make sure its always 0, even if you have to peer another JBuffer to make the offset/index start with 0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was with the "index" parameter. It was used as an index into the supplied byte[] not into the memory buffer. Algorithm is fixed.
Fixed in rc6. As a work around, do not use the index parameter and make sure its always 0, even if you have to peer another JBuffer to make the offset/index start with 0.