/// <exception cref="System.IO.IOException"/> /// <exception cref="com.fasterxml.jackson.core.JsonGenerationException"/> public override void writeRaw(com.fasterxml.jackson.core.SerializableString text) { byte[] raw = text.asUnquotedUTF8(); if (raw.Length > 0) { _writeBytes(raw); } }
// since 2.5 /// <exception cref="System.IO.IOException"/> public override void writeRawValue(com.fasterxml.jackson.core.SerializableString text) { _verifyValueWrite(WRITE_RAW); byte[] raw = text.asUnquotedUTF8(); if (raw.Length > 0) { _writeBytes(raw); } }
/// <exception cref="System.IO.IOException"/> /// <exception cref="com.fasterxml.jackson.core.JsonGenerationException"/> private int _writeCustomEscape(byte[] outputBuffer, int outputPtr, com.fasterxml.jackson.core.SerializableString esc, int remainingChars) { byte[] raw = esc.asUnquotedUTF8(); // must be escaped at this point, shouldn't double-quote int len = raw.Length; if (len > 6) { // may violate constraints we have, do offline return _handleLongCustomEscape(outputBuffer, outputPtr, _outputEnd, raw, remainingChars ); } // otherwise will fit without issues, so: System.Array.Copy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }