public static <T> void writeListTo(OutputStream out, List<T> messages,
            Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws IOException
    {
        final IOContext context = new IOContext(DEFAULT_SMILE_FACTORY._getBufferRecycler(),
                out, false);

        final SmileGenerator generator = newSmileGenerator(out, buffer.buffer, 0, false,
                context);

        // final SmileGenerator generator = DEFAULT_SMILE_FACTORY.createJsonGenerator(out);
        try
        {
            JsonIOUtil.writeListTo(generator, messages, schema, numeric);
        }
        finally
        {
            generator.close();
        }
    }
Serializes the {@code messages} into the stream using the given schema.
<p>
The {@link LinkedBuffer}'s internal byte array will be used as the primary buffer when writing the message.
protostuff-json/src/main/java/io/protostuff/SmileIOUtil.java