protected void writeData(final byte[] serializedObject, final int leftPage, final int rightPage, final int leftBound, final int rightBound) {
byte[] page = null;
int offset = 0;
try {
for (int i = leftPage; i <= rightPage; i++) {
page = this.bufferManager.getPage(this.pageSize, new PageAddress(i, this.path1));
if (leftPage == rightPage) {
System.arraycopy(serializedObject, 0, page, leftBound, serializedObject.length);
this.bufferManager.modifyPage(this.pageSize, new PageAddress(i, this.path1), page);
offset += serializedObject.length;
} else if (i == leftPage) {
System.arraycopy(serializedObject, 0, page, leftBound, this.pageSize - leftBound);
this.bufferManager.modifyPage(this.pageSize, new PageAddress(i, this.path1), page);
offset += this.pageSize - leftBound;
} else if (i != leftPage && i != rightPage) {
System.arraycopy(serializedObject, offset, page, 0, this.pageSize);
this.bufferManager.modifyPage(this.pageSize, new PageAddress(i, this.path1), page);
offset += this.pageSize;
} else if (i == rightPage) {
System.arraycopy(serializedObject, offset, page, 0, rightBound);
this.bufferManager.modifyPage(this.pageSize, new PageAddress(i, this.path1), page);
offset += rightBound;
}
}
this.bufferManager.writeAllModifiedPages();
} catch (final IOException e1) {