Class BigDecimalParser


  • public final class BigDecimalParser
    extends java.lang.Object
    Internal Jackson Helper class used to implement more optimized parsing of 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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.math.BigDecimal parse​(char[] chars)
      Internal Jackson method.
      static java.math.BigDecimal parse​(char[] chars, int off, int len)
      Internal Jackson method.
      static java.math.BigDecimal parse​(java.lang.String valueStr)
      Internal Jackson method.
      static java.math.BigDecimal parseWithFastParser​(char[] ch, int off, int len)  
      static java.math.BigDecimal parseWithFastParser​(java.lang.String valueStr)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parse

        public static java.math.BigDecimal parse​(java.lang.String valueStr)
        Internal Jackson method. Please do not use.
        Parameters:
        valueStr -
        Returns:
        BigDecimal value
        Throws:
        java.lang.NumberFormatException
      • parse

        public static java.math.BigDecimal parse​(char[] chars,
                                                 int off,
                                                 int len)
        Internal Jackson method. Please do not use.
        Returns:
        BigDecimal value
        Throws:
        java.lang.NumberFormatException
      • parse

        public static java.math.BigDecimal parse​(char[] chars)
        Internal Jackson method. Please do not use.
        Parameters:
        chars -
        Returns:
        BigDecimal value
        Throws:
        java.lang.NumberFormatException
      • parseWithFastParser

        public static java.math.BigDecimal parseWithFastParser​(java.lang.String valueStr)
      • parseWithFastParser

        public static java.math.BigDecimal parseWithFastParser​(char[] ch,
                                                               int off,
                                                               int len)