Class JsonDoubleBitsFromByteArray


final class JsonDoubleBitsFromByteArray extends AbstractJsonFloatingPointBitsFromByteArray
Parses a double from a byte array.
  • Constructor Details

    • JsonDoubleBitsFromByteArray

      public JsonDoubleBitsFromByteArray()
      Creates a new instance.
  • Method Details

    • valueOfFloatLiteral

      long valueOfFloatLiteral(byte[] str, int startIndex, int endIndex, boolean isNegative, long significand, int exponent, boolean isSignificandTruncated, int exponentOfTruncatedSignificand)
      Description copied from class: AbstractJsonFloatingPointBitsFromByteArray
      Computes a float value from the given components of a decimal float literal.
      Specified by:
      valueOfFloatLiteral in class AbstractJsonFloatingPointBitsFromByteArray
      Parameters:
      str - the string that contains the float literal (and maybe more)
      startIndex - the start index (inclusive) of the float literal inside the string
      endIndex - the end index (exclusive) of the float literal inside the string
      isNegative - whether the float value is negative
      significand - the significand of the float value (can be truncated)
      exponent - the exponent of the float value
      isSignificandTruncated - whether the significand is truncated
      exponentOfTruncatedSignificand - the exponent value of the truncated significand
      Returns:
      the bit pattern of the parsed value, if the input is legal; otherwise, -1L.