private long parseLong(String value,String setting){
  long number;
  int multiplier=getMultiplier(value);
  if (multiplier > 1) {
    value=value.replaceAll("[^\\d.]","");
  }
  try {
    number=Long.parseLong(value) * multiplier;
  }
 catch (  NumberFormatException e) {
    throw new SettingsError("Invalid numeric setting '" + value + "' for '"+ setting+ "'\n"+ e.getMessage());
  }
  return number;
}

private long parseLong ( String value , String setting ) { long number ; int multiplier = getMultiplier ( value ) ; if ( multiplier > 1 ) { value = value . replaceAll ( "[^\\d.]" , "" ) ; } try { number = Long . parseLong ( value ) * multiplier ; } catch ( NumberFormatException e ) { throw new SettingsError ( "Invalid numeric setting '" + value + "' for '" + setting + "'\n" + e . getMessage ( ) ) ; } return number ; }
parses a long value from a string valued setting . supports kilo ( k ) , mega ( m ) and giga ( g ) suffixes .
