static UTF8JsonGenerator newJsonGenerator(OutputStream out, byte[] buf, int offset,
            boolean bufferRecyclable, IOContext context)
    {
        context.setEncoding(JsonEncoding.UTF8);

        return new UTF8JsonGenerator(context,
                DEFAULT_JSON_FACTORY.getGeneratorFeaturesImpl(),
                DEFAULT_JSON_FACTORY.getCodec(),
                out,
                buf,
                offset,
                bufferRecyclable);
    }
Creates a {@link UTF8JsonGenerator} for the outputstream with the supplied buf {@code outBuffer} to use.
protostuff-json/src/main/java/io/protostuff/JsonIOUtil.java