public static <T> int writeDelimitedTo(DataOutput out, T message, Schema<T> schema)
            throws IOException
    {
        final LinkedBuffer buffer = new LinkedBuffer(LinkedBuffer.MIN_BUFFER_SIZE);
        final ProtostuffOutput output = new ProtostuffOutput(buffer);
        final GraphProtostuffOutput graphOutput = new GraphProtostuffOutput(output);
        schema.writeTo(graphOutput, message);
        ProtobufOutput.writeRawVarInt32Bytes(out, output.size);
        LinkedBuffer.writeTo(out, buffer);
        return output.size;
    }
Used by the code generated messages that implement {@link java.io.Externalizable}. Writes to the
{@link DataOutput} .

@return the size of the message.
protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java