Java Code Examples for com.fasterxml.jackson.core.io.IOContext#allocTokenBuffer()

The following examples show how to use com.fasterxml.jackson.core.io.IOContext#allocTokenBuffer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReaderBasedJsonParser.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Method called when input comes as a {@link java.io.Reader}, and buffer allocation
 * can be done using default mechanism.
 */
public ReaderBasedJsonParser(IOContext ctxt, int features, Reader r,
    ObjectCodec codec, CharsToNameCanonicalizer st)
{
    super(ctxt, features);
    _reader = r;
    _inputBuffer = ctxt.allocTokenBuffer();
    _inputPtr = 0;
    _inputEnd = 0;
    _objectCodec = codec;
    _symbols = st;
    _hashSeed = st.hashSeed();
    _bufferRecyclable = true;
}
 
Example 2
Source File: ReaderBasedJsonParser.java    From openbd-core with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Method called when input comes as a {@link java.io.Reader}, and buffer allocation
 * can be done using default mechanism.
 */
public ReaderBasedJsonParser(IOContext ctxt, int features, Reader r,
    ObjectCodec codec, CharsToNameCanonicalizer st)
{
    super(ctxt, features);
    _reader = r;
    _inputBuffer = ctxt.allocTokenBuffer();
    _inputPtr = 0;
    _inputEnd = 0;
    _objectCodec = codec;
    _symbols = st;
    _hashSeed = st.hashSeed();
    _bufferRecyclable = true;
}
 
Example 3
Source File: MincodeParser.java    From divolte-collector with Apache License 2.0 5 votes vote down vote up
MincodeParser(final IOContext ctxt,
              final int parserFeatures,
              @Nullable final ObjectCodec objectCodec,
              final Reader reader) {
    super(ctxt, parserFeatures);
    this.reader = Objects.requireNonNull(reader);
    this.inputBuffer = ctxt.allocTokenBuffer();
    this._inputPtr = 0;
    this._inputEnd = 0;
    this.bufferRecyclable = true;
    this.objectCodec = objectCodec;
}