code: public static Long createLong(final String str) {
          if (str == null) {
              return null;
          }
          return Long.decode(str);
      }
docs: <p>Convert a <code>String</code> to a <code>Long</code>;
  since 3.1 it handles hex (0Xhhhh) and octal (0ddd) notations.
  N.B. a leading zero means octal; spaces are not trimmed.</p>
  
  <p>Returns <code>null</code> if the string is <code>null</code>.</p>
  
  @param str  a <code>String</code> to convert, may be null
  @return converted <code>Long</code> (or null if the input is null)
  @throws NumberFormatException if the value cannot be converted