// Process others:
while (commands.hasNext()) {
WriteCommand current = commands.next();
forceToDisk |= current.sync;
buffer.writeInt(current.location.getSize());
buffer.writeByte(current.location.getType());
buffer.write(current.data.getData(), current.data.getOffset(), current.data.getLength());
latest = current;
}
// Now we can fill in the batch control record properly.