protected int parseInt(String buffer,int start,int end) throws NumberFormatException {
  int radix=10;
  int result=0;
  int digit=0;
  int limit=-Integer.MAX_VALUE;
  int multmin=limit / radix;
  int i=start;
  do {
    digit=getDigit(buffer.charAt(i));
    if (digit < 0)     throw new NumberFormatException("'" + buffer + "' has wrong format");
    if (result < multmin)     throw new NumberFormatException("'" + buffer + "' has wrong format");
    result*=radix;
    if (result < limit + digit)     throw new NumberFormatException("'" + buffer + "' has wrong format");
    result-=digit;
  }
 while (++i < end);
  return -result;
}

protected int parseInt ( String buffer , int start , int end ) throws NumberFormatException { int radix = 10 ; int result = 0 ; int digit = 0 ; int limit = - Integer . MAX_VALUE ; int multmin = limit / radix ; int i = start ; do { digit = getDigit ( buffer . charAt ( i ) ) ; if ( digit < 0 ) throw new NumberFormatException ( "'" + buffer + "' has wrong format" ) ; if ( result < multmin ) throw new NumberFormatException ( "'" + buffer + "' has wrong format" ) ; result *= radix ; if ( result < limit + digit ) throw new NumberFormatException ( "'" + buffer + "' has wrong format" ) ; result -= digit ; } while ( ++ i < end ) ; return - result ; }
given start and end position , parses string value
