@Override public void writeRaw(SerializableString text) throws IOException { byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
private final int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
private final int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite(WRITE_RAW); byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
@Override public void writeRaw(SerializableString text) throws IOException { int len = text.appendUnquotedUTF8(_outputBuffer, _outputTail); if (len < 0) { _writeBytes(text.asUnquotedUTF8()); } else { _outputTail += len; } }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite(WRITE_RAW); int len = text.appendUnquotedUTF8(_outputBuffer, _outputTail); if (len < 0) { _writeBytes(text.asUnquotedUTF8()); } else { _outputTail += len; } }
case JsonWriteContext.STATUS_OK_AFTER_SPACE: // root-value separator if (_rootValueSeparator != null) { byte[] raw = _rootValueSeparator.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw);
case JsonWriteContext.STATUS_OK_AFTER_SPACE: // root-value separator if (_rootValueSeparator != null) { byte[] raw = _rootValueSeparator.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw);
private final int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
private int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
private int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
@Override public void writeRaw(SerializableString text) throws IOException, JsonGenerationException { byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
private final int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
private final int _writeCustomEscape(byte[] outputBuffer, int outputPtr, SerializableString esc, int remainingChars) throws IOException, JsonGenerationException { 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.arraycopy(raw, 0, outputBuffer, outputPtr, len); return (outputPtr + len); }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite(WRITE_RAW); byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite("write raw value"); byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite("write raw value"); byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
@Override public void writeRawValue(SerializableString text) throws IOException { _verifyValueWrite(WRITE_RAW); byte[] raw = text.asUnquotedUTF8(); if (raw.length > 0) { _writeBytes(raw); } }
@Override public final void writeString(SerializableString sstr) throws IOException { _verifyValueWrite("write String value"); byte[] raw = sstr.asUnquotedUTF8(); final int len = raw.length; if (len == 0) { _writeByte(BYTE_EMPTY_STRING); return; } _writeLengthMarker(PREFIX_TYPE_TEXT, len); _writeBytes(raw, 0, len); }
@Override public final void writeString(SerializableString sstr) throws IOException { _verifyValueWrite("write String value"); byte[] raw = sstr.asUnquotedUTF8(); final int len = raw.length; if (len == 0) { _writeByte(BYTE_EMPTY_STRING); return; } _writeLengthMarker(PREFIX_TYPE_TEXT, len); _writeBytes(raw, 0, len); }