/** * @since 2.4 */ protected final Writer _decorate(Writer out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final OutputStream _decorate(OutputStream out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
protected OutputStream _decorate(IOContext ioCtxt, OutputStream out) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ioCtxt, out); if (out2 != null) { return out2; } } return out; }
protected Writer _decorate(IOContext ioCtxt, Writer out) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ioCtxt, out); if (out2 != null) { return out2; } } return out; } }
/** * @since 2.4 */ protected final Writer _decorate(Writer out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final Writer _decorate(Writer out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final OutputStream _decorate(OutputStream out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final Writer _decorate(Writer out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final OutputStream _decorate(OutputStream out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final OutputStream _decorate(OutputStream out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final Writer _decorate(Writer out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { Writer out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
/** * @since 2.4 */ protected final OutputStream _decorate(OutputStream out, IOContext ctxt) throws IOException { if (_outputDecorator != null) { OutputStream out2 = _outputDecorator.decorate(ctxt, out); if (out2 != null) { return out2; } } return out; }
@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); }
@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); }
@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); }
/** * Method for constructing JSON generator for writing JSON content * using specified Writer. *<p> * Underlying stream <b>is NOT owned</b> by the generator constructed, * so that generator will NOT close the Reader when * {@link JsonGenerator#close} is called (unless auto-closing * feature, * {@link com.fasterxml.jackson.core.JsonGenerator.Feature#AUTO_CLOSE_TARGET} is enabled). * Using application needs to close it explicitly. * * @param out Writer to use for writing JSON content */ public JsonGenerator createJsonGenerator(Writer out) throws IOException { IOContext ctxt = _createContext(out, false); // [JACKSON-512]: allow wrapping with _outputDecorator if (_outputDecorator != null) { out = _outputDecorator.decorate(ctxt, out); } return _createJsonGenerator(out, ctxt); }
/** * Method for constructing JSON generator for writing JSON content * using specified Writer. *<p> * Underlying stream <b>is NOT owned</b> by the generator constructed, * so that generator will NOT close the Reader when * {@link JsonGenerator#close} is called (unless auto-closing * feature, * {@link com.fasterxml.jackson.core.JsonGenerator.Feature#AUTO_CLOSE_TARGET} is enabled). * Using application needs to close it explicitly. *<p> * NOTE: starting with 2.1, should not be used (will be deprecated in 2.2); * instead, should call <code>createGenerator</code>. * * @param out Writer to use for writing JSON content */ public JsonGenerator createJsonGenerator(Writer out) throws IOException { IOContext ctxt = _createContext(out, false); // [JACKSON-512]: allow wrapping with _outputDecorator if (_outputDecorator != null) { out = _outputDecorator.decorate(ctxt, out); } return _createGenerator(out, ctxt); }
@Override public BsonGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException { IOContext ctxt = _createContext(out, true); ctxt.setEncoding(enc); if (enc == JsonEncoding.UTF8 && _outputDecorator != null) { out = _outputDecorator.decorate(ctxt, out); } BsonGenerator g = new BsonGenerator(_generatorFeatures, _bsonGeneratorFeatures, out); ObjectCodec codec = getCodec(); if (codec != null) { g.setCodec(codec); } if (_characterEscapes != null) { g.setCharacterEscapes(_characterEscapes); } return g; }
@Override public BsonGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException { IOContext ctxt = _createContext(out, true); ctxt.setEncoding(enc); if (enc == JsonEncoding.UTF8 && _outputDecorator != null) { out = _outputDecorator.decorate(ctxt, out); } BsonGenerator g = new BsonGenerator(_generatorFeatures, _bsonGeneratorFeatures, out); ObjectCodec codec = getCodec(); if (codec != null) { g.setCodec(codec); } if (_characterEscapes != null) { g.setCharacterEscapes(_characterEscapes); } return g; }
@Override public BsonGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException { IOContext ctxt = _createContext(out, true); ctxt.setEncoding(enc); if (enc == JsonEncoding.UTF8 && _outputDecorator != null) { out = _outputDecorator.decorate(ctxt, out); } BsonGenerator g = new BsonGenerator(_generatorFeatures, _bsonGeneratorFeatures, out); ObjectCodec codec = getCodec(); if (codec != null) { g.setCodec(codec); } if (_characterEscapes != null) { g.setCharacterEscapes(_characterEscapes); } return g; }