final PageAddress pageAddress = new PageAddress(0, this.pointersFilename);
final byte[] page = BufferManager.getBufferManager().getPage(this.TABLEPAGESIZE, pageAddress);
final int hashAddress = Math.abs(thiskey.hashCode()) % this.TABLESIZE;
final OutputStream outKeys = new ExistingByteArrayOutputStream(page, hashAddress * 8);
OutHelper.writeLuposLong(0, outKeys);
outKeys.close();
BufferManager.getBufferManager().modifyPage(this.TABLEPAGESIZE, pageAddress, page);
} catch (final IOException e) {
System.err.println(e);
e.printStackTrace();
}
} // key is not last entry in key list
else {
try {
final PageAddress pageAddressPointers = new PageAddress(0, this.pointersFilename);
final byte[] pagePointers = BufferManager.getBufferManager().getPage(this.TABLEPAGESIZE, pageAddressPointers);
final int hashAddress = Math.abs(thiskey.hashCode()) % this.TABLESIZE;
final OutputStream outKeys = new ExistingByteArrayOutputStream(pagePointers, hashAddress * 8);
OutHelper.writeLuposLong(this.getKey(addressOfFoundKey).getFourth(), outKeys);
outKeys.close();
BufferManager.getBufferManager().modifyPage(this.TABLEPAGESIZE, pageAddressPointers, pagePointers);
} catch (final IOException e) {
System.err.println(e);
e.printStackTrace();
}