| Modifier and Type | Field and Description |
|---|---|
| protected boolean | _bufferRecyclable
Flag that indicates whether the input buffer is recycable (and needs to be returned to recycler once we are done) or not. |
| protected byte[] | _inputBuffer
Current buffer from which data is read; generally data is read into buffer from input source, but in some cases pre-loaded buffer is handed to the parser. |
| protected InputStream | _inputStream
Input stream that can be used for reading more content, if one in use. |
| protected boolean | _tokenIncomplete
Flag that indicates that the current token has not yet been fully processed, and needs to be finished for some access (or skipped to obtain the next token) |
| protected int | _typeAsInt
Type byte of the current token (as in) |
| private static final boolean | JDK11_OR_LATER
Flag to indicate if the JDK version is 11 or later. |
| Access | Constructor and Description |
|---|---|
| public | SmileParser(ObjectReadContext readCtxt, IOContext ctxt, int parserFeatures, int smileFeatures, ByteQuadsCanonicalizer sym, InputStream in, byte[] inputBuffer, int start, int end, boolean bufferRecyclable)
|
| Modifier and Type | Method and Description |
|---|---|
| private final String | |
| private final JsonToken | |
| protected void | _closeInput()
Implements abstract tools. Abstract method for sub-classes to implement; to be called by
|
| private final void | |
| private final String | |
| private final void | |
| private final String | |
| protected final String | |
| private final String | _decodeShortUnicodeName(int
Length between 1 and 64 len)Helper method used to decode short Unicode string, length for which actual length (in bytes) is known |
| protected final String | |
| private final int | |
| private final int | |
| private final int | |
| private final int | Returns: Character value minus 0x10000; this so that caller can readily expand it to actual surrogates
|
| private final JsonToken | |
| private final String[] | _expandSeenNames(String[] oldShared)
Method called to try to expand shared name area to fit one more potentially shared String. |
| private final void | |
| private final String | _findDecodedFixed12(int len, int q1, int q2)
Method for locating names longer than 12 bytes (in UTF-8) |
| private final String | _findDecodedFromSymbols(final int len)
Helper method for trying to find specified encoded UTF-8 byte sequence from symbol table; if successful avoids actual decoding to String. |
| private String | |
| private String | |
| private final void | |
| private final void | |
| protected byte[] | |
| private final byte[] | |
| protected byte[] | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| protected final void | |
| protected final void | |
| private final int | |
| private final int | |
| private final byte[] | |
| private static int[] | |
| private final String | |
| protected final JsonToken | _handlePropertyName()
Method that handles initial token type recognition for token that has to be either PROPERTY_NAME or END_OBJECT. |
| private final JsonToken | |
| protected final boolean | |
| protected final void | |
| protected final void | _loadToHaveAtLeast(int
Minimum number of bytes we absolutely need minAvailable)Helper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessary. |
| private JsonToken | |
| private final byte | |
| private int | |
| private final int | _nextNameFromSymbolsLong(PropertyNameMatcher matcher, int len, int q1, int q2)
Method for locating names longer than 8 bytes (in UTF-8) |
| private final int | |
| private int | |
| private static final int | |
| private static final int | |
| protected void | _parseNumericValue()
Implements abstract tools. Method called to complete parsing of a numeric value: will throw
|
| protected boolean | _parseNumericValueIfNumber()
Implements abstract tools. Similar to |
| private final byte[] | |
| private void | |
| protected final int | |
| protected final int | |
| protected void | _releaseBuffers2()
Implements abstract tools. Method called to release internal buffers owned by the base reader. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected final void | |
| protected String | _reportTruncatedUTF8InName(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected)
|
| protected String | _reportTruncatedUTF8InString(int strLenBytes, int truncatedCharOffset, int firstUTFByteValue, int bytesExpected)
|
| private JsonToken | |
| protected void | |
| protected void | |
| protected void | _skipIncomplete()
Method called to skip remainders of an incomplete token, when contents themselves will not be needed any more |
| protected final int | Returns: Number of bytes that were missing, if any;0 for successful
readHelper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessary. |
| private void | |
| private void | |
| public void | finishToken()
Overrides tools. Method for forcing full read of current token, even if it might otherwise
only be read if data is accessed via |
| public byte[] | getBinaryValue(Base64Variant b64variant)
Implements abstract tools. Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value. |
| public Object | getEmbeddedObject()
Overrides tools. Accessor that can be called if (and only if) the current token
is |
| public String | getString()
Implements abstract tools. Method for accessing textual representation of the current event;
if no current event (before first call to |
| public int | getString(Writer writer)
Overrides tools. Method to read the textual representation of the current token in chunks and pass it to the given Writer. |
| public char[] | getStringCharacters()
Implements abstract tools. Method similar to |
| public int | getStringLength()
Implements abstract tools. Accessor used with |
| public int | getStringOffset()
Implements abstract tools. Accessor used with |
| public String | getValueAsString()
Overrides tools. Method that will try to convert value of current token to a
|
| public String | getValueAsString(String defaultValue)
Overrides tools. Method that will try to convert value of current token to a
|
| protected boolean | Returns: True if valid signature was found and handled; false if notHelper method called when it looks like input might contain the signature; and it is necessary to detect and handle signature to get configuration information it might have. |
| public boolean | hasStringCharacters()
Implements abstract tools. Method that can be used to determine whether calling of
|
| public Boolean | nextBooleanValue()
Overrides tools. Method that fetches next token (as if calling |
| public int | nextIntValue(int defaultValue)
Overrides tools. Method that fetches next token (as if calling return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public long | nextLongValue(long defaultValue)
Overrides tools. Method that fetches next token (as if calling return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public String | nextName()
Overrides tools. Method that fetches next token (as if calling |
| public boolean | nextName(SerializableString str)
Overrides tools. Method that fetches next token (as if calling |
| public int | nextNameMatch(PropertyNameMatcher matcher)
Overrides tools. Method that tries to match next token from stream as |
| public String | nextStringValue()
Overrides tools. Method that fetches next token (as if calling |
| public JsonToken | nextToken()
Implements abstract tools. Main iteration method, which will advance stream enough to determine type of the next token, if any. |
| public int | readBinaryValue(Base64Variant b64variant, OutputStream out)
Overrides tools. Similar to |
| public int | releaseBuffered(OutputStream out)
Overrides tools. Method that can be called to push back any content that has been read but not consumed by the parser. |
| public Object | streamReadInputSource()
Implements abstract tools. Method that can be used to get access to object that is used
to access input being parsed; this is usually either
|