question: public static int readInt ( final JSONObject jsonObject , final String key , final boolean required , final boolean notNull ) throws JSONException { if ( required ) { return jsonObject . getInt ( key ) ; } if ( notNull && jsonObject . isNull ( key ) ) { throw new JSONException ( String . format ( Locale . US , NULL_VALUE_FORMAT_OBJECT , key ) ) ; } int value = 0 ; if ( ! jsonObject . isNull ( key ) ) { value = jsonObject . getInt ( key ) ; } return value ; }
target:  Reads the int value from the Json Object for specified tag.