private int convertHexToInt(String hexValue){
  int value;
  try {
    value=Integer.parseInt(hexValue,16);
  }
 catch (  NumberFormatException e) {
    logger.error("Failed to convert binary data to integer (" + hexValue + ")",e);
    return 0;
  }
  return value;
}

private int convertHexToInt ( String hexValue ) { int value ; try { value = Integer . parseInt ( hexValue , 16 ) ; } catch ( NumberFormatException e ) { logger . error ( "Failed to convert binary data to integer (" + hexValue + ")" , e ) ; return 0 ; } return value ; }
converthextoint converts a given hexadecimal string to an integer value .
