Number from a byte array.
This class should have a type parameter for the return value of its parse
methods. Unfortunately Java does not support type parameters for primitive
types. As a workaround we use long. A long has enough bits to
fit a double value or a float value.
See JsonDoubleParser for the grammar of Number.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final long | Returns: the bit pattern of the parsed value, if the input is legal; otherwise,-1L.a string containing a str, int FloatingPointLiteralWithWhiteSpacestart offset of offset, int FloatingPointLiteralWithWhiteSpace in strlength of length)FloatingPointLiteralWithWhiteSpace in strParses a |
| pack-priv abstract long | Returns: the bit pattern of the parsed value, if the input is legal; otherwise,-1L.the string that contains the float literal (and maybe more) str, int the start index (inclusive) of the float literal
inside the string startIndex, int the end index (exclusive) of the float literal inside
the string endIndex, boolean whether the float value is negative isNegative, long the significand of the float value (can be truncated) significand, int the exponent of the float value exponent, boolean whether the significand is truncated isSignificandTruncated, int the exponent value of the truncated
significand exponentOfTruncatedSignificand)Computes a float value from the given components of a decimal float literal. |
| AbstractJsonFloatingPointBitsFromByteArray | back to summary |
|---|---|
| pack-priv AbstractJsonFloatingPointBitsFromByteArray() | |
| parseNumber | back to summary |
|---|---|
| public final long parseNumber(byte[] str, int offset, int length) Parses a
See
| |
| valueOfFloatLiteral | back to summary |
|---|---|
| pack-priv abstract long valueOfFloatLiteral(byte[] str, int startIndex, int endIndex, boolean isNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand) Computes a float value from the given components of a decimal float literal.
| |