private static String quoteParam(String param){
  if (param.contains("\"") || param.contains("'")) {
    throw new IllegalArgumentException("Invalid character in parameter");
  }
  return "\"" + param + "\"";
}

private static String quoteParam ( String param ) { if ( param . contains ( "\"" ) || param . contains ( "'" ) ) { throw new IllegalArgumentException ( "Invalid character in parameter" ) ; } return "\"" + param + "\"" ; }
quote a parameter to be included in the header . parameters with embedded quotes will be rejected .
