ByteArrayOS bos = dos.getUnderlyingStream();
bos.reset();
w.write(dos);
ensureCapacity(bos.len(), true);
int i = currentSize * 2;
System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
keyOffsetsArray[i] = bytesUsed;
keyOffsetsArray[i+1] = bos.len();
int[] posRet = position(new EntryPosition(currentSize));
int pos = posRet[1];