@Override
    protected <T> byte[] toByteArray(T message, Schema<T> schema)
    {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        try
        {
            MsgpackXIOUtil.writeTo(out, message, schema, true, buf());
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
        return out.toByteArray();
    }
Message pack standard tests that are using streamed version of the MsgpackXOutput

@author Alex Shvid
protostuff-msgpack/src/test/java/io/protostuff/MsgpackStreamedNumericStandardTest.java