public static <T> byte[] toByteArray(T message, Schema<T> schema, boolean numeric)
    {
        ArrayBufferOutput out = new ArrayBufferOutput();
        try
        {
            writeTo(out, message, schema, numeric);
        }
        catch (IOException e)
        {
            throw new RuntimeException("Serializing to a byte array threw an IOException", e);
        }
        return out.toByteArray();
    }
Serializes the {@code message} using the given {@code schema}.
protostuff-msgpack/src/main/java/io/protostuff/MsgpackIOUtil.java