|
|
|
@ -156,8 +156,8 @@ public final class BLOBHeap extends BLOBHeapModifier implements BLOB {
|
|
|
|
|
|
|
|
|
|
// append all contents of the buffer into one byte[]
|
|
|
|
|
i = this.buffer.entrySet().iterator();
|
|
|
|
|
final int pos = (int) file.length();
|
|
|
|
|
int posFile = pos;
|
|
|
|
|
final long pos = file.length();
|
|
|
|
|
long posFile = pos;
|
|
|
|
|
int posBuffer = 0;
|
|
|
|
|
|
|
|
|
|
byte[] ba = new byte[l + (4 + this.index.row().primaryKeyLength) * this.buffer.size()];
|
|
|
|
@ -175,6 +175,8 @@ public final class BLOBHeap extends BLOBHeapModifier implements BLOB {
|
|
|
|
|
assert posBuffer + 4 + key.length <= ba.length : "posBuffer = " + posBuffer + ", key.length = " + key.length + ", ba.length = " + ba.length;
|
|
|
|
|
System.arraycopy(key, 0, ba, posBuffer + 4, key.length);
|
|
|
|
|
assert posBuffer + 4 + key.length + blob.length <= ba.length : "posBuffer = " + posBuffer + ", key.length = " + key.length + ", blob.length = " + blob.length + ", ba.length = " + ba.length;
|
|
|
|
|
//System.out.println("*** DEBUG blob.length=" + blob.length + ",ba.length=" + ba.length + ",posBuffer=" + posBuffer + ",key.length=" + key.length + ",blob.length=" + blob.length);
|
|
|
|
|
//System.err.println("*** DEBUG blob.length=" + blob.length + ",ba.length=" + ba.length + ",posBuffer=" + posBuffer + ",key.length=" + key.length + ",blob.length=" + blob.length);
|
|
|
|
|
System.arraycopy(blob, 0, ba, posBuffer + 4 + key.length, blob.length); //java.lang.ArrayIndexOutOfBoundsException here
|
|
|
|
|
posFile += 4 + key.length + blob.length;
|
|
|
|
|
posBuffer += 4 + key.length + blob.length;
|
|
|
|
|