| Modifier and Type | Class and Description |
|---|---|
| public static enum | SmileParser.Feature
Enumeration that defines all togglable features for Smile generators. |
| 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 ObjectCodec | _objectCodec
Codec used for data binding when (if) requested. |
| 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(IOContext ctxt, int parserFeatures, int smileFeatures, ObjectCodec codec, 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 com. |
| 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[] | |
| protected final JsonToken | _handleFieldName()
Method that handles initial token type recognition for token that has to be either FIELD_NAME or END_OBJECT. |
| private final String | |
| 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 static final int | |
| private static final int | |
| protected void | _parseNumericValue()
Implements abstract com. |
| private final byte[] | |
| private void | |
| protected final int | |
| protected final int | |
| protected void | _releaseBuffers2()
Implements abstract com. |
| protected void | |
| 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 String | |
| 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 com. getText and similar methods.
|
| public byte[] | getBinaryValue(Base64Variant
Expected variant of base64 encoded
content (see b64variant)Base64Variants for definitions
of "standard" variants).Implements abstract com. |
| public ObjectCodec | getCodec()
Implements abstract com. ObjectCodec associated with this
parser, if any.
|
| public Object | getEmbeddedObject()
Overrides com. JsonToken#VALUE_EMBEDDED_OBJECT.
|
| public Object | getInputSource()
Overrides com. InputStream or Reader, depending on what
parser was constructed with.
|
| public String | getText()
Implements abstract com. nextToken, or
after encountering end-of-input), returns null.
|
| public int | |
| public char[] | getTextCharacters()
Implements abstract com. getText, but that will return
underlying (unmodifiable) character array that contains
textual value, instead of constructing a String object
to contain this information.
|
| public int | getTextLength()
Implements abstract com. getTextCharacters, to know length
of String stored in returned buffer.
|
| public int | getTextOffset()
Implements abstract com. getTextCharacters, to know offset
of the first text content character within buffer.
|
| public String | getValueAsString()
Overrides com. java..
|
| public String | getValueAsString(String
Default value to return if conversion to defaultValue)String is not possibleOverrides com. java..
|
| 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 | hasTextCharacters()
Implements abstract com. getTextCharacters would be the most efficient
way to access textual content for the event parser currently
points to.
|
| public Boolean | nextBooleanValue()
Overrides com. nextToken) and
if it is JsonToken#VALUE_TRUE or JsonToken#VALUE_FALSE
returns matching Boolean value; otherwise return null.
|
| public boolean | nextFieldName(SerializableString
Property name to compare next token to (if next token is
str)JsonToken.FIELD_NAME)Overrides com. nextToken) and
verifies whether it is JsonToken#FIELD_NAME with specified name
and returns result of that comparison.
|
| public String | nextFieldName()
Overrides com. nextToken) and
verifies whether it is JsonToken#FIELD_NAME; if it is,
returns same as getCurrentName(), otherwise null.
|
| public int | nextIntValue(int
Value to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTOverrides com. nextToken) and
if it is JsonToken#VALUE_NUMBER_INT returns 32-bit int value;
otherwise returns specified default value
It is functionally equivalent to:
return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public long | nextLongValue(long
Value to return if next token is NOT of type defaultValue)JsonToken.VALUE_NUMBER_INTOverrides com. nextToken) and
if it is JsonToken#VALUE_NUMBER_INT returns 64-bit long value;
otherwise returns specified default value
It is functionally equivalent to:
return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? |
| public String | nextTextValue()
Overrides com. nextToken) and
if it is JsonToken#VALUE_STRING returns contained String value;
otherwise returns null.
|
| public JsonToken | nextToken()
Implements abstract com. |
| public int | readBinaryValue(Base64Variant
base64 variant to use b64variant, OutputStream Output stream to use for passing decoded binary data out)Overrides com. readBinaryValue(OutputStream) but allows explicitly
specifying base64 variant to use.
|
| public int | releaseBuffered(OutputStream
OutputStream to which buffered, undecoded content is written to out)Overrides com. |
| public void | setCodec(ObjectCodec
Codec to assign, if any; c)null if noneImplements abstract com. ObjectCodec associated with this
parser, if any.
|