public void writeInternal(DataOutput out) throws IOException { out.writeUTF(name); byte[] targetBytes = Util.toBytes(target); out.writeInt(targetBytes.length); out.write(targetBytes); }