public int readInt(String pSection, String pKey, int pDefault)
{

    //if the ini file was never loaded from memory, return the default
    if (buffer == null) {return(pDefault);}

    Parameters params = new Parameters();

    //get the value associated with pSection and PKey
    String valueText = getValue(pSection, pKey, params);

    //if Section/Key not found, return the default
    if (valueText.equals("")) {return(pDefault);}

    int value;

    //try to convert the remainder of the string after the '=' symbol to an
    //integer if an error occurs, return the default value

    try{
        value = Integer.parseInt(valueText);
    }
    catch(NumberFormatException e){return(pDefault);}

    return(value);

}//end of IniFile::readInt