com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer源码实例Demo

类com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer源码实例Demo

下面列出了com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lams   文件: UTF8StreamJsonParser.java
public UTF8StreamJsonParser(IOContext ctxt, int features, InputStream in,
        ObjectCodec codec, ByteQuadsCanonicalizer sym,
        byte[] inputBuffer, int start, int end,
        boolean bufferRecyclable)
{
    super(ctxt, features);
    _inputStream = in;
    _objectCodec = codec;
    _symbols = sym;
    _inputBuffer = inputBuffer;
    _inputPtr = start;
    _inputEnd = end;
    _currInputRowStart = start;
    // If we have offset, need to omit that from byte offset, so:
    _currInputProcessed = -start;
    _bufferRecyclable = bufferRecyclable;
}
 
源代码2 项目: lams   文件: ByteSourceJsonBootstrapper.java
public JsonParser constructParser(int parserFeatures, ObjectCodec codec,
        ByteQuadsCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols,
        int factoryFeatures) throws IOException
{
    JsonEncoding enc = detectEncoding();

    if (enc == JsonEncoding.UTF8) {
        /* and without canonicalization, byte-based approach is not performant; just use std UTF-8 reader
         * (which is ok for larger input; not so hot for smaller; but this is not a common case)
         */
        if (JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(factoryFeatures)) {
            ByteQuadsCanonicalizer can = rootByteSymbols.makeChild(factoryFeatures);
            return new UTF8StreamJsonParser(_context, parserFeatures, _in, codec, can,
                    _inputBuffer, _inputPtr, _inputEnd, _bufferRecyclable);
        }
    }
    return new ReaderBasedJsonParser(_context, parserFeatures, constructReader(), codec,
            rootCharSymbols.makeChild(factoryFeatures));
}
 
源代码3 项目: openbd-core   文件: UTF8StreamJsonParser.java
public UTF8StreamJsonParser(IOContext ctxt, int features, InputStream in,
        ObjectCodec codec, ByteQuadsCanonicalizer sym,
        byte[] inputBuffer, int start, int end,
        boolean bufferRecyclable)
{
    super(ctxt, features);
    _inputStream = in;
    _objectCodec = codec;
    _symbols = sym;
    _inputBuffer = inputBuffer;
    _inputPtr = start;
    _inputEnd = end;
    _currInputRowStart = start;
    // If we have offset, need to omit that from byte offset, so:
    _currInputProcessed = -start;
    _bufferRecyclable = bufferRecyclable;
}
 
源代码4 项目: openbd-core   文件: ByteSourceJsonBootstrapper.java
public JsonParser constructParser(int parserFeatures, ObjectCodec codec,
        ByteQuadsCanonicalizer rootByteSymbols, CharsToNameCanonicalizer rootCharSymbols,
        int factoryFeatures) throws IOException
{
    JsonEncoding enc = detectEncoding();

    if (enc == JsonEncoding.UTF8) {
        /* and without canonicalization, byte-based approach is not performance; just use std UTF-8 reader
         * (which is ok for larger input; not so hot for smaller; but this is not a common case)
         */
        if (JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.enabledIn(factoryFeatures)) {
            ByteQuadsCanonicalizer can = rootByteSymbols.makeChild(factoryFeatures);
            return new UTF8StreamJsonParser(_context, parserFeatures, _in, codec, can,
                    _inputBuffer, _inputPtr, _inputEnd, _bufferRecyclable);
        }
    }
    return new ReaderBasedJsonParser(_context, parserFeatures, constructReader(), codec,
            rootCharSymbols.makeChild(factoryFeatures));
}
 
源代码5 项目: lams   文件: UTF8DataInputJsonParser.java
public UTF8DataInputJsonParser(IOContext ctxt, int features, DataInput inputData,
        ObjectCodec codec, ByteQuadsCanonicalizer sym,
        int firstByte)
{
    super(ctxt, features);
    _objectCodec = codec;
    _symbols = sym;
    _inputData = inputData;
    _nextByte = firstByte;
}
 
源代码6 项目: lams   文件: NonBlockingJsonParserBase.java
public NonBlockingJsonParserBase(IOContext ctxt, int parserFeatures,
        ByteQuadsCanonicalizer sym)
{
    super(ctxt, parserFeatures);
    _symbols = sym;
    _currToken = null;
    _majorState = MAJOR_INITIAL;
    _majorStateAfterValue = MAJOR_ROOT;
}
 
源代码7 项目: lams   文件: JsonFactory.java
/**
 * Optional factory method, expected to be overridden
 *
 * @since 2.8
 */
protected JsonParser _createParser(DataInput input, IOContext ctxt) throws IOException
{
    // 13-May-2016, tatu: Need to take care not to accidentally create JSON parser for
    //   non-JSON input.
    _requireJSONFactory("InputData source not (yet?) support for this format (%s)");
    // Also: while we can't do full bootstrapping (due to read-ahead limitations), should
    // at least handle possible UTF-8 BOM
    int firstByte = ByteSourceJsonBootstrapper.skipUTF8BOM(input);
    ByteQuadsCanonicalizer can = _byteSymbolCanonicalizer.makeChild(_factoryFeatures);
    return new UTF8DataInputJsonParser(ctxt, _parserFeatures, input,
            _objectCodec, can, firstByte);
}
 
源代码8 项目: lams   文件: NonBlockingJsonParser.java
public NonBlockingJsonParser(IOContext ctxt, int parserFeatures,
        ByteQuadsCanonicalizer sym)
{
    super(ctxt, parserFeatures, sym);
}
 
源代码9 项目: lams   文件: NonBlockingJsonParserBase.java
protected ByteQuadsCanonicalizer symbolTableForTests() {
    return _symbols;
}
 
源代码10 项目: dremio-oss   文件: JsonIOUtils.java
/**
 * Needed by jackson's internal utf8 stream parser.
 */
public ByteQuadsCanonicalizer getRootByteSymbols() {
  return _byteSymbolCanonicalizer;
}
 
源代码11 项目: protostuff   文件: SmileIOUtil.java
/**
 * Needed by jackson's internal utf8 stream parser.
 */
public ByteQuadsCanonicalizer getRootByteSymbols()
{
    return _byteSymbolCanonicalizer;
}
 
源代码12 项目: protostuff   文件: JsonIOUtil.java
/**
 * Needed by jackson's internal utf8 strema parser.
 */
public ByteQuadsCanonicalizer getRootByteSymbols()
{
    return _byteSymbolCanonicalizer;
}
 
源代码13 项目: lams   文件: JsonFactory.java
/**
 * Optional method for constructing parser for non-blocking parsing
 * via {@link com.fasterxml.jackson.core.async.ByteArrayFeeder}
 * interface (accessed using {@link JsonParser#getNonBlockingInputFeeder()}
 * from constructed instance).
 *<p>
 * If this factory does not support non-blocking parsing (either at all,
 * or from byte array),
 * will throw {@link UnsupportedOperationException}
 *
 * @since 2.9
 */
public JsonParser createNonBlockingByteArrayParser() throws IOException
{
    // 17-May-2017, tatu: Need to take care not to accidentally create JSON parser
    //   for non-JSON input:
    _requireJSONFactory("Non-blocking source not (yet?) support for this format (%s)");
    IOContext ctxt = _createContext(null, false);
    ByteQuadsCanonicalizer can = _byteSymbolCanonicalizer.makeChild(_factoryFeatures);
    return new NonBlockingJsonParser(ctxt, _parserFeatures, can);
}
 
源代码评论
动弹
沙发等你来抢
 类方法
 同包方法