@Override protected void doWrite(final DataOutputExtended output, final Encodable encodable) throws IOException { try { // write out class final String className = encodable.getClass().getName(); if (LOG.isDebugEnabled()) { log(this, new StringBuilder().append(className)); } output.writeUTF(className); // recursively encode encodable.encode(output); } finally { if (LOG.isDebugEnabled()) { unlog(this); } } }