Class SmileParserBootstrapper
java.lang.Object
com.fasterxml.jackson.dataformat.smile.SmileParserBootstrapper
Simple bootstrapper version used with Smile format parser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
Flag that indicates whether buffer above is to be recycled after being used or not.protected final com.fasterxml.jackson.core.io.IOContext
protected final InputStream
protected final byte[]
protected int
protected int
Current number of input units (bytes or chars) that were processed in previous blocks, before contents of current input buffer.protected int
-
Constructor Summary
ConstructorsConstructorDescriptionSmileParserBootstrapper
(com.fasterxml.jackson.core.io.IOContext ctxt, byte[] inputBuffer, int inputStart, int inputLen) SmileParserBootstrapper
(com.fasterxml.jackson.core.io.IOContext ctxt, InputStream in) -
Method Summary
Modifier and TypeMethodDescriptionconstructParser
(int factoryFeatures, int generalParserFeatures, int smileFeatures, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer rootByteSymbols) static com.fasterxml.jackson.core.format.MatchStrength
hasSmileFormat
(com.fasterxml.jackson.core.format.InputAccessor acc) private static boolean
likelySmileValue
(byte b) private static boolean
possibleSmileValue
(byte b, boolean lenient)
-
Field Details
-
_context
protected final com.fasterxml.jackson.core.io.IOContext _context -
_in
-
_inputBuffer
protected final byte[] _inputBuffer -
_inputPtr
protected int _inputPtr -
_inputEnd
protected int _inputEnd -
_bufferRecyclable
protected final boolean _bufferRecyclableFlag that indicates whether buffer above is to be recycled after being used or not. -
_inputProcessed
protected int _inputProcessedCurrent number of input units (bytes or chars) that were processed in previous blocks, before contents of current input buffer.Note: includes possible BOMs, if those were part of the input.
-
-
Constructor Details
-
SmileParserBootstrapper
-
SmileParserBootstrapper
public SmileParserBootstrapper(com.fasterxml.jackson.core.io.IOContext ctxt, byte[] inputBuffer, int inputStart, int inputLen)
-
-
Method Details
-
constructParser
public SmileParser constructParser(int factoryFeatures, int generalParserFeatures, int smileFeatures, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer rootByteSymbols) throws IOException, com.fasterxml.jackson.core.JsonParseException - Throws:
IOException
com.fasterxml.jackson.core.JsonParseException
-
hasSmileFormat
public static com.fasterxml.jackson.core.format.MatchStrength hasSmileFormat(com.fasterxml.jackson.core.format.InputAccessor acc) throws IOException - Throws:
IOException
-
likelySmileValue
private static boolean likelySmileValue(byte b) -
possibleSmileValue
private static boolean possibleSmileValue(byte b, boolean lenient) - Parameters:
lenient
- Whether to consider more speculative matches or not (typically true when there is context like start-array)
-