} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
public void truncateAndClose(long size) {
<BUG>try {
munmap(baseAdress, length);
fileChannel.truncate(size);</BUG>
System.out.println("Closing memory mapped file after truncating to length of " + size);
fileChannel.close();

} catch (Exception ex) {
throw new RuntimeException(ex);
}
return this;
}
public void free() {
try {
if (this.baseAdress != 0L) {
munmap(baseAdress, length);
this.baseAdress = 0L;
}
fileChannel.close();
