gpt4 book ai didi

com.fasterxml.jackson.core.json.WriterBasedJsonGenerator._writeString()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 03:17:05 26 4
gpt4 key购买 nike

本文整理了Java中com.fasterxml.jackson.core.json.WriterBasedJsonGenerator._writeString()方法的一些代码示例,展示了WriterBasedJsonGenerator._writeString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriterBasedJsonGenerator._writeString()方法的具体详情如下:
包路径:com.fasterxml.jackson.core.json.WriterBasedJsonGenerator
类名称:WriterBasedJsonGenerator
方法名:_writeString

WriterBasedJsonGenerator._writeString介绍

[英]This method called when the string content is already in a char buffer, and need not be copied for processing.
[中]当字符串内容已经在字符缓冲区中,并且不需要复制以进行处理时,调用此方法。

代码示例

代码示例来源:origin: redisson/redisson

protected final void _writeFieldName(String name, boolean commaBefore) throws IOException
{
  if (_cfgPrettyPrinter != null) {
    _writePPFieldName(name, commaBefore);
    return;
  }
  // for fast+std case, need to output up to 2 chars, comma, dquote
  if ((_outputTail + 1) >= _outputEnd) {
    _flushBuffer();
  }
  if (commaBefore) {
    _outputBuffer[_outputTail++] = ',';
  }
  // Alternate mode, in which quoting of field names disabled?
  if (_cfgUnqNames) {
    _writeString(name);
    return;
  }
  // we know there's room for at least one more char
  _outputBuffer[_outputTail++] = _quoteChar;
  // The beef:
  _writeString(name);
  // and closing quotes; need room for one more char:
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: redisson/redisson

/**
 * Specialized version of <code>_writeFieldName</code>, off-lined
 * to keep the "fast path" as simple (and hopefully fast) as possible.
 */
protected final void _writePPFieldName(String name, boolean commaBefore) throws IOException
{
  if (commaBefore) {
    _cfgPrettyPrinter.writeObjectEntrySeparator(this);
  } else {
    _cfgPrettyPrinter.beforeObjectEntries(this);
  }
  if (_cfgUnqNames) {// non-standard, omit quotes
    _writeString(name);
  } else { 
    if (_outputTail >= _outputEnd) {
      _flushBuffer();
    }
    _outputBuffer[_outputTail++] = _quoteChar;
    _writeString(name);
    if (_outputTail >= _outputEnd) {
      _flushBuffer();
    }
    _outputBuffer[_outputTail++] = _quoteChar;
  }
}

代码示例来源:origin: redisson/redisson

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: FasterXML/jackson-core

protected final void _writeFieldName(String name, boolean commaBefore) throws IOException
{
  if (_cfgPrettyPrinter != null) {
    _writePPFieldName(name, commaBefore);
    return;
  }
  // for fast+std case, need to output up to 2 chars, comma, dquote
  if ((_outputTail + 1) >= _outputEnd) {
    _flushBuffer();
  }
  if (commaBefore) {
    _outputBuffer[_outputTail++] = ',';
  }
  // Alternate mode, in which quoting of field names disabled?
  if (_cfgUnqNames) {
    _writeString(name);
    return;
  }
  // we know there's room for at least one more char
  _outputBuffer[_outputTail++] = _quoteChar;
  // The beef:
  _writeString(name);
  // and closing quotes; need room for one more char:
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: FasterXML/jackson-core

/**
 * Specialized version of <code>_writeFieldName</code>, off-lined
 * to keep the "fast path" as simple (and hopefully fast) as possible.
 */
protected final void _writePPFieldName(String name, boolean commaBefore) throws IOException
{
  if (commaBefore) {
    _cfgPrettyPrinter.writeObjectEntrySeparator(this);
  } else {
    _cfgPrettyPrinter.beforeObjectEntries(this);
  }
  if (_cfgUnqNames) {// non-standard, omit quotes
    _writeString(name);
  } else { 
    if (_outputTail >= _outputEnd) {
      _flushBuffer();
    }
    _outputBuffer[_outputTail++] = _quoteChar;
    _writeString(name);
    if (_outputTail >= _outputEnd) {
      _flushBuffer();
    }
    _outputBuffer[_outputTail++] = _quoteChar;
  }
}

代码示例来源:origin: FasterXML/jackson-core

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: redisson/redisson

@Override
public void writeString(String text) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: redisson/redisson

_flushBuffer();
_writeString(buf, 0, numRead);

代码示例来源:origin: FasterXML/jackson-core

@Override
public void writeString(String text) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: FasterXML/jackson-core

_flushBuffer();
_writeString(buf, 0, numRead);

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-core

@Override
public void writeString(char[] text, int offset, int len)
  throws IOException, JsonGenerationException
{
  _verifyValueWrite("write text value");
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite("write text value");
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite("write text value");
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: Nextdoor/bender

@Override
public void writeString(char[] text, int offset, int len) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public void writeString(char[] text, int offset, int len)
  throws IOException, JsonGenerationException
{
  _verifyValueWrite("write text value");
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text, offset, len);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

@Override
public void writeString(String text) throws IOException
{
  _verifyValueWrite("write text value");
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public void writeString(String text)
  throws IOException, JsonGenerationException
{
  _verifyValueWrite("write text value");
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public void writeString(String text) throws IOException
{
  _verifyValueWrite("write text value");
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = '"';
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public void writeString(String text) throws IOException
{
  _verifyValueWrite(WRITE_STRING);
  if (text == null) {
    _writeNull();
    return;
  }
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
  _writeString(text);
  // And finally, closing quotes
  if (_outputTail >= _outputEnd) {
    _flushBuffer();
  }
  _outputBuffer[_outputTail++] = _quoteChar;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com