当前位置: 首页>>代码示例>>Java>>正文


Java IOContext.allocWriteEncodingBuffer方法代码示例

本文整理汇总了Java中com.fasterxml.jackson.core.io.IOContext.allocWriteEncodingBuffer方法的典型用法代码示例。如果您正苦于以下问题:Java IOContext.allocWriteEncodingBuffer方法的具体用法?Java IOContext.allocWriteEncodingBuffer怎么用?Java IOContext.allocWriteEncodingBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.fasterxml.jackson.core.io.IOContext的用法示例。


在下文中一共展示了IOContext.allocWriteEncodingBuffer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: UTF8JsonGenerator

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
public UTF8JsonGenerator(ObjectWriteContext writeCtxt, IOContext ioCtxt,
        int features, OutputStream out,
        SerializableString rootValueSep, CharacterEscapes charEsc, PrettyPrinter pp)
{
    super(writeCtxt, ioCtxt, features, rootValueSep, charEsc, pp);
    _outputStream = out;
    _bufferRecyclable = true;
    _outputBuffer = ioCtxt.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 = ioCtxt.allocConcatBuffer();
    _charBufferLength = _charBuffer.length;

    // By default we use this feature to determine additional quoting
    if (isEnabled(Feature.ESCAPE_NON_ASCII)) {
        setHighestNonEscapedChar(127);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:UTF8JsonGenerator.java

示例2: UTF8JsonGenerator

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
public UTF8JsonGenerator(IOContext paramIOContext, int paramInt, ObjectCodec paramObjectCodec, OutputStream paramOutputStream)
{
  super(paramIOContext, paramInt, paramObjectCodec);
  this._outputStream = paramOutputStream;
  this._bufferRecyclable = true;
  this._outputBuffer = paramIOContext.allocWriteEncodingBuffer();
  this._outputEnd = this._outputBuffer.length;
  this._outputMaxContiguous = (this._outputEnd >> 3);
  this._charBuffer = paramIOContext.allocConcatBuffer();
  this._charBufferLength = this._charBuffer.length;
  if (isEnabled(JsonGenerator.Feature.ESCAPE_NON_ASCII))
    setHighestNonEscapedChar(127);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:14,代码来源:UTF8JsonGenerator.java


注:本文中的com.fasterxml.jackson.core.io.IOContext.allocWriteEncodingBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。