paddedLastBlock = BucketTools.pad(buf, CHKBlock.DATA_LENGTH, buf.length);
} else {
this.hasPaddedLastBlock = false;
}
byte[] header = null;
<BUG>Bucket segmentSettings = null, crossSegmentSettings = null;
if (persistent) {
header = encodeHeader();
segmentSettings = encodeSegmentSettings(); // Checksummed with length</BUG>
try {

paddedLastBlock = BucketTools.pad(buf, CHKBlock.DATA_LENGTH, buf.length);
} else {
this.hasPaddedLastBlock = false;
}
byte[] header = null;
Bucket segmentSettings = null, crossSegmentSettings = null;
int offsetsLength = 0;
if (persistent) {
header = encodeHeader();
offsetsLength = encodeOffsets().length;
segmentSettings = encodeSegmentSettings(); // Checksummed with length
try {
