Subject Re: ArrayIndexOutOfBoundsException trying to read blob
Author tesanovic
Hi!

I'm not sure but maybe the blob is smaller than 16 bytes or it is null.

I'm using the code above and I don't have any problems:
(assuming that your picture data is on position)

byte[] imageBytes = null;

Blob blob = rs.getBlob(4);

if (!rs.wasNull())
{
imageBytes = rs.getBytes(1, (int)blob.length());
}