gpt4 book ai didi

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

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

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

WriterBasedJsonGenerator._writeLongString介绍

[英]Method called to write "long strings", strings whose length exceeds output buffer length.
[中]方法来写入“长字符串”,即长度超过输出缓冲区长度的字符串。

代码示例

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text) throws IOException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text)
  throws IOException, JsonGenerationException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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

private void _writeString(String text)
  throws IOException, JsonGenerationException
{
  /* One check first: if String won't fit in the buffer, let's
   * segment writes. No point in extending buffer to huge sizes
   * (like if someone wants to include multi-megabyte base64
   * encoded stuff or such)
   */
  final int len = text.length();
  if (len > _outputEnd) { // Let's reserve space for entity at begin/end
    _writeLongString(text);
    return;
  }
  // Ok: we know String will fit in buffer ok
  // But do we need to flush first?
  if ((_outputTail + len) > _outputEnd) {
    _flushBuffer();
  }
  text.getChars(0, len, _outputBuffer, _outputTail);
  if (_characterEscapes != null) {
    _writeStringCustom(len);
  } else if (_maximumNonEscapedChar != 0) {
    _writeStringASCII(len, _maximumNonEscapedChar);
  } else {
    _writeString2(len);
  }
}

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