static String handleIllegalCharacterInResult(final String result){
  String tempResult=result;
  if (tempResult != null && tempResult.contains(" ")) {
    tempResult=tempResult.replaceAll(" ","_");
  }
  return tempResult;
}

static String handleIllegalCharacterInResult ( final String result ) { String tempResult = result ; if ( tempResult != null && tempResult . contains ( " " ) ) { tempResult = tempResult . replaceAll ( " " , "_" ) ; } return tempResult ; }
handle illegal character in result string .
