use of com.fasterxml.jackson.core.io.IOContext in project bson4jackson by michel-kraemer.
the class BsonFactory method createGenerator.
@Override
public BsonGenerator createGenerator(File f, JsonEncoding enc) throws IOException {
OutputStream out = new FileOutputStream(f);
IOContext ctxt = _createContext(out, true);
ctxt.setEncoding(enc);
if (enc == JsonEncoding.UTF8 && _outputDecorator != null) {
out = _outputDecorator.decorate(ctxt, out);
}
return createGenerator(out, enc);
}
Aggregations