Class ParsingUtils


  • public final class ParsingUtils
    extends java.lang.Object
    Utility methods for parsing data and converting it to other formats.
    Since:
    1.26.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int parseIntValue​(java.lang.String value)
      Parses the provided string value to an Integer, assuming a base-10 radix
      static int parseIntValue​(java.lang.String value, int radix)
      Parse the provided string value to an Integer with a provided radix
      static long parseLongValue​(java.lang.String value)
      Parses the provided string value to a Long, assuming a base-10 radix
      static long parseLongValue​(java.lang.String value, int radix)
      Parses the provided string value to a Long with a provided radix
      • Methods inherited from class java.lang.Object

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

      • parseIntValue

        public static int parseIntValue​(java.lang.String value)
                                 throws java.io.IOException
        Parses the provided string value to an Integer, assuming a base-10 radix
        Parameters:
        value - string value to parse
        Returns:
        parsed value as an int
        Throws:
        java.io.IOException - when the value cannot be parsed
      • parseIntValue

        public static int parseIntValue​(java.lang.String value,
                                        int radix)
                                 throws java.io.IOException
        Parse the provided string value to an Integer with a provided radix
        Parameters:
        value - string value to parse
        radix - radix value to use for parsing
        Returns:
        parsed value as an int
        Throws:
        java.io.IOException - when the value cannot be parsed
      • parseLongValue

        public static long parseLongValue​(java.lang.String value)
                                   throws java.io.IOException
        Parses the provided string value to a Long, assuming a base-10 radix
        Parameters:
        value - string value to parse
        Returns:
        parsed value as a long
        Throws:
        java.io.IOException - when the value cannot be parsed
      • parseLongValue

        public static long parseLongValue​(java.lang.String value,
                                          int radix)
                                   throws java.io.IOException
        Parses the provided string value to a Long with a provided radix
        Parameters:
        value - string value to parse
        radix - radix value to use for parsing
        Returns:
        parsed value as a long
        Throws:
        java.io.IOException - when the value cannot be parsed