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


Java IOContext.allocTokenBuffer方法代码示例

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


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

示例1: createParser

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
@Override
public JsonParser createParser(ObjectReadContext readCtxt,
        String content) throws IOException
{
    final int strLen = content.length();
    // Actually, let's use this for medium-sized content, up to 64kB chunk (32kb char)
    if ((_inputDecorator != null) || (strLen > 0x8000) || !canUseCharArrays()) {
        // easier to just wrap in a Reader than extend InputDecorator; or, if content
        // is too long for us to copy it over
        return createParser(readCtxt, new StringReader(content));
    }
    IOContext ioCtxt = _createContext(content, true);
    char[] buf = ioCtxt.allocTokenBuffer(strLen);
    content.getChars(0, strLen, buf, 0);
    return _createParser(readCtxt, ioCtxt, buf, 0, strLen, true);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:TextualTSFactory.java

示例2: ReaderBasedJsonParser

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
/**
 * Method called when input comes as a {@link java.io.Reader}, and buffer allocation
 * can be done using default mechanism.
 */
public ReaderBasedJsonParser(ObjectReadContext readCtxt, IOContext ctxt,
        int features, Reader r,
        CharsToNameCanonicalizer st)
{
    super(readCtxt, ctxt, features);
    _reader = r;
    _inputBuffer = ctxt.allocTokenBuffer();
    _inputPtr = 0;
    _inputEnd = 0;
    _symbols = st;
    _hashSeed = st.hashSeed();
    _bufferRecyclable = true;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:ReaderBasedJsonParser.java

示例3: ReaderBasedJsonParser

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
public ReaderBasedJsonParser(IOContext paramIOContext, int paramInt, Reader paramReader, ObjectCodec paramObjectCodec, CharsToNameCanonicalizer paramCharsToNameCanonicalizer)
{
  super(paramIOContext, paramInt);
  this._reader = paramReader;
  this._inputBuffer = paramIOContext.allocTokenBuffer();
  this._objectCodec = paramObjectCodec;
  this._symbols = paramCharsToNameCanonicalizer;
  this._hashSeed = paramCharsToNameCanonicalizer.hashSeed();
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:10,代码来源:ReaderBasedJsonParser.java

示例4: ReaderBasedJsonParser

import com.fasterxml.jackson.core.io.IOContext; //导入方法依赖的package包/类
public ReaderBasedJsonParser(IOContext ctxt, int features, Reader r,
        ObjectCodec codec, CharsToNameCanonicalizer st)
{
    super(ctxt, features);
    _reader = r;
    _inputBuffer = ctxt.allocTokenBuffer();
    _objectCodec = codec;
    _symbols = st;
    _hashSeed = st.hashSeed();
}
 
开发者ID:BFergerson,项目名称:Beam,代码行数:11,代码来源:ReaderBasedJsonParser.java


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