static LinkedBuffer writeTag(final String name, final boolean repeated,
            final WriteSink sink, final WriteSession session, LinkedBuffer lb)
            throws IOException
    {
        lb = sink.writeStrAscii(name,
                session,
                sink.writeByte(
                        EXCLAMATION,
                        session,
                        lb));
        if (repeated)
            return sink.writeByteArray(EMPTY_ARRAY, session, lb);

        return lb;
    }
Before serializing a message/object tied to a schema, this should be called.
protostuff-yaml/src/main/java/io/protostuff/YamlOutput.java