Subject | Re: ArrayIndexOutOfBoundsException trying to read blob |
---|---|
Author | tesanovic |
Post date | 2007-10-15T10:50:21Z |
Sorry again. Here is the code I use:
byte[] imageBytes = null;
Blob blob = rs.getBlob(16);
if (!rs.wasNull())
{
// blob.getBytes and not rs.getBytes :)
imageBytes = blob.getBytes(1, (int)blob.length());
}
I think I also had some problems with reading blobs (it was long time
ago and i can't remember what was the problem) and then I found this
solution.
Bye,
damir
byte[] imageBytes = null;
Blob blob = rs.getBlob(16);
if (!rs.wasNull())
{
// blob.getBytes and not rs.getBytes :)
imageBytes = blob.getBytes(1, (int)blob.length());
}
I think I also had some problems with reading blobs (it was long time
ago and i can't remember what was the problem) and then I found this
solution.
Bye,
damir