private void appendToString(final StringBuilder sb)
    {
        sb.append('\n');
        append(sb, INDENT, "public String toString()");
        append(sb, INDENT, "{");
        append(sb, INDENT, "    if (null == buffer)");
        append(sb, INDENT, "    {");
        append(sb, INDENT, "        return \"\";");
        append(sb, INDENT, "    }");
        sb.append('\n');
        append(sb, INDENT, "    return appendTo(new StringBuilder()).toString();");
        append(sb, INDENT, "}");
    }
\n" +
                "     * Field presence indication. Can be optional, required, or constant.\n" +
                "
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java/JavaGenerator.java