/** @see LogReadable#readFromLog */ public void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException { super.readFromLog(itemBuffer, entryTypeVersion); boolean dataExists = LogUtils.readBoolean(itemBuffer); if (dataExists) { data = LogUtils.readByteArray(itemBuffer); } }
/** @see LoggableObject#writeToLog */ public void writeToLog(ByteBuffer logBuffer) { super.writeToLog(logBuffer); boolean dataExists = !isDeleted(); LogUtils.writeBoolean(logBuffer, dataExists); if (dataExists) { LogUtils.writeByteArray(logBuffer, data); } }
/** @see LogReadable#dumpLog */ public void dumpLog(StringBuffer sb, boolean verbose) { sb.append(beginTag()); super.dumpLog(sb, verbose); if (data != null) { sb.append("<data>"); sb.append(TreeUtils.dumpByteArray(data)); sb.append("</data>"); } dumpLogAdditional(sb, verbose); sb.append(endTag()); }