@Override
    public <T> void writeObject(int fieldNumber, T value, Schema<T> schema,
            boolean repeated) throws IOException
    {
        if (encodeNestedMessageAsGroup)
        {
            writeObjectEncodedAsGroup(fieldNumber, value, schema, repeated);
            return;
        }

        ByteArrayNode lastCurrent = current;
        int lastSize = size;

        schema.writeTo(this, value);

        int msgSize = size - lastSize;

        int tag = WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_LENGTH_DELIMITED);
        byte[] delimited = CodedOutput.getTagAndRawVarInt32Bytes(tag, msgSize);

        size += delimited.length;

        // the first tag of the message
        ByteArrayNode node = lastCurrent.next;

        // insert the byte array (message size)
        new ByteArrayNode(delimited, lastCurrent).next = node;

    }
Returns the data written to this output as a single byte array.
protostuff-core/src/test/java/io/protostuff/DeferredOutput.java