public WriterBasedJsonGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int features, com.fasterxml.jackson.core.ObjectCodec codec, System.IO.TextWriter w) : base(ctxt, features, codec) { /* /********************************************************** /* Output buffering /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _writer = w; _outputBuffer = ctxt.allocConcatBuffer(); _outputEnd = _outputBuffer.Length; }
public UTF8JsonGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int features , com.fasterxml.jackson.core.ObjectCodec codec, Sharpen.OutputStream @out) : base(ctxt, features, codec) { // intermediate copies only made up to certain length... /* /********************************************************** /* Output buffering /********************************************************** */ /* /********************************************************** /* Quick flags /********************************************************** */ /* /********************************************************** /* Life-cycle /********************************************************** */ _outputStream = @out; _bufferRecyclable = true; _outputBuffer = ctxt.allocWriteEncodingBuffer(); _outputEnd = _outputBuffer.Length; /* To be exact, each char can take up to 6 bytes when escaped (Unicode * escape with backslash, 'u' and 4 hex digits); but to avoid fluctuation, * we will actually round down to only do up to 1/8 number of chars */ _outputMaxContiguous = _outputEnd >> 3; _charBuffer = ctxt.allocConcatBuffer(); _charBufferLength = _charBuffer.Length; // By default we use this feature to determine additional quoting if (isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature.ESCAPE_NON_ASCII)) { setHighestNonEscapedChar(127); } _cfgUnqNames = !com.fasterxml.jackson.core.JsonGenerator.Feature.QUOTE_FIELD_NAMES .enabledIn(features); }
public UTF8JsonGenerator(com.fasterxml.jackson.core.io.IOContext ctxt, int features , com.fasterxml.jackson.core.ObjectCodec codec, Sharpen.OutputStream @out, byte[] outputBuffer, int outputOffset, bool bufferRecyclable) : base(ctxt, features, codec) { _outputStream = @out; _bufferRecyclable = bufferRecyclable; _outputTail = outputOffset; _outputBuffer = outputBuffer; _outputEnd = _outputBuffer.Length; // up to 6 bytes per char (see above), rounded up to 1/8 _outputMaxContiguous = (_outputEnd >> 3); _charBuffer = ctxt.allocConcatBuffer(); _charBufferLength = _charBuffer.Length; _cfgUnqNames = !com.fasterxml.jackson.core.JsonGenerator.Feature.QUOTE_FIELD_NAMES .enabledIn(features); }