public static int writeTo(final DataOutput out, LinkedBuffer node) throws IOException
    {
        int contentSize = 0, len;
        do
        {
            if ((len = node.offset - node.start) > 0)
            {
                out.write(node.buffer, node.start, len);
                contentSize += len;
            }
        } while ((node = node.next) != null);

        return contentSize;
    }
Writes the contents of the {@link LinkedBuffer} into the {@link DataOutput}.

@return the total content size of the buffer.
protostuff-api/src/main/java/io/protostuff/LinkedBuffer.java