* @throws IOException if an I/O error occurs.
*/
protected void writeLog(TransactionLogRecord tlog) throws IOException {
try {
int status = tlog.getStatus();
Uid gtrid = tlog.getGtrid();
int recordSize = tlog.calculateTotalRecordSize();
ByteBuffer buf = ByteBuffer.allocate(recordSize);
buf.putInt(tlog.getStatus());
buf.putInt(tlog.getRecordLength());
buf.putInt(tlog.getHeaderLength());
buf.putLong(tlog.getTime());
buf.putInt(tlog.getSequenceNumber());
buf.putInt(tlog.getCrc32());
buf.put((byte) gtrid.getArray().length);
buf.put(gtrid.getArray());
Set<String> uniqueNames = tlog.getUniqueNames();
buf.putInt(uniqueNames.size());
for (String uniqueName : uniqueNames) {
buf.putShort((short) uniqueName.length());
buf.put(uniqueName.getBytes());