Class BigDecimalParser
BigDecimal for REALLY
big values (over 500 characters).
This class is not meant to be used directly. It is designed to be used by Jackson JSON parsers (and parsers for other Jackson supported data formats). The parsers check for invalid characters and the length of the number. Without these checks, this parser is susceptible to performing badly with invalid inputs. If you need to parse numbers directly, please use JavaBigDecimalParser in fastdoubleparser instead.
Based on ideas from this this git commit.
- Since:
- 2.13
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimalparse(char[] chars) Internal Jackson method.static BigDecimalparse(char[] chars, int off, int len) Internal Jackson method.static BigDecimalInternal Jackson method.static BigDecimalparseWithFastParser(char[] ch, int off, int len) Internal Jackson method.static BigDecimalparseWithFastParser(String valueStr) Internal Jackson method.
-
Method Details
-
parse
Internal Jackson method. Please do not use.Note: Caller MUST pre-validate that given String represents a valid representation of
BigDecimalvalue: parsers injackson-coredo that; other code must do the same.- Parameters:
valueStr-- Returns:
- BigDecimal value
- Throws:
NumberFormatException
-
parse
Internal Jackson method. Please do not use.Note: Caller MUST pre-validate that given String represents a valid representation of
BigDecimalvalue: parsers injackson-coredo that; other code must do the same.- Returns:
- BigDecimal value
- Throws:
NumberFormatException
-
parse
Internal Jackson method. Please do not use.Note: Caller MUST pre-validate that given String represents a valid representation of
BigDecimalvalue: parsers injackson-coredo that; other code must do the same.- Parameters:
chars-- Returns:
- BigDecimal value
- Throws:
NumberFormatException
-
parseWithFastParser
Internal Jackson method. Please do not use.Note: Caller MUST pre-validate that given String represents a valid representation of
BigDecimalvalue: parsers injackson-coredo that; other code must do the same.- Parameters:
valueStr-- Returns:
- BigDecimal value
- Throws:
NumberFormatException
-
parseWithFastParser
Internal Jackson method. Please do not use.Note: Caller MUST pre-validate that given String represents a valid representation of
BigDecimalvalue: parsers injackson-coredo that; other code must do the same.- Returns:
- BigDecimal value
- Throws:
NumberFormatException
-