private static String convertToQuotedString(String string){
  if (string == null || string.length() == 0) {
    return null;
  }
  if (string.charAt(0) == '"' && string.charAt(string.length() - 1) == '"') {
    return string;
  }
  return '\"' + string + '\"';
}

private static String convertToQuotedString ( String string ) { if ( string == null || string . length ( ) == 0 ) { return null ; } if ( string . charAt ( 0 ) == '"' && string . charAt ( string . length ( ) - 1 ) == '"' ) { return string ; } return '\"' + string + '\"' ; }
encloses the incoming string inside double quotes , if it isn ' t already quoted .
