this.keylength += klength;
<BUG>this.baosDos.writeInt(vlength);
</BUG>
this.valuelength += vlength;
<BUG>this.baosDos.write(key, koffset, klength);

this.baosDos.write(value, voffset, vlength);
</BUG>
if (this.firstKey == null) {
this.firstKey = new byte [klength];

this.keylength += klength;
this.out.writeInt(vlength);
this.valuelength += vlength;
this.out.write(key, koffset, klength);
this.out.write(value, voffset, vlength);
if (this.firstKey == null) {
this.firstKey = new byte [klength];
