public static LinkedBuffer writeUTF8FixedDelimited(final CharSequence str,
            final boolean littleEndian, final WriteSession session,
            final LinkedBuffer lb) throws IOException
    {
        int lastSize = session.size, len = str.length(), withIntOffset = lb.offset + 2;

        // the buffer could very well be almost-full.
        if (withIntOffset + len > lb.buffer.length)
        {
            // flush what we have.
            lb.offset = session.flush(lb.buffer, lb.start, lb.offset - lb.start);
            withIntOffset = lb.offset + 2;

            if (len == 0)
            {
                writeFixed2ByteInt(0, lb.buffer, withIntOffset - 2, littleEndian);
                lb.offset = withIntOffset;
                // update size
                session.size += 2;
                return lb;
            }

            // if true, the string is too large to fit in the buffer
            if (withIntOffset + len > lb.buffer.length)
            {
                lb.offset = withIntOffset;

                // slow path
                final LinkedBuffer rb = StringSerializer.writeUTF8(str, 0, len,
                        lb.buffer, withIntOffset, lb.buffer.length, session, lb);

                writeFixed2ByteInt((session.size - lastSize), lb.buffer,
                        withIntOffset - 2, littleEndian);

                // update size
                session.size += 2;

                assert rb != lb;
                // flush and reset nodes
                flushAndReset(lb, session);

                return lb;
            }
        }
        else if (len == 0)
        {
            writeFixed2ByteInt(0, lb.buffer, withIntOffset - 2, littleEndian);
            lb.offset = withIntOffset;
            // update size
            session.size += 2;
            return lb;
        }

        // everything fits
        lb.offset = withIntOffset;

        final LinkedBuffer rb = StringSerializer.writeUTF8(str, 0, len, session, lb);

        writeFixed2ByteInt((session.size - lastSize), lb.buffer,
                withIntOffset - 2, littleEndian);

        // update size
        session.size += 2;

        if (rb != lb)
        {
            // flush and reset nodes
            flushAndReset(lb, session);
        }

        return lb;
    }
The length of the utf8 bytes is written first before the string - which is fixed 2-bytes.
protostuff-api/src/main/java/io/protostuff/StreamedStringSerializer.java