org.eclipse.jetty.util.MultiMap.getString()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.eclipse.jetty.util.MultiMap.getString()方法的一些代码示例,展示了MultiMap.getString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.getString()方法的具体详情如下:
包路径:org.eclipse.jetty.util.MultiMap
类名称:MultiMap
方法名:getString

MultiMap.getString介绍

[英]Get value as String. Single valued items are converted to a String with the toString() Object method. Multi valued entries are converted to a comma separated List. No quoting of commas within values is performed.
[中]获取字符串形式的值。使用toString()对象方法将单值项转换为字符串。多值条目将转换为逗号分隔的列表。不在值中引用逗号。

代码示例

代码示例来源:origin: jphp-group/jphp

@Signature
public String query(String name) {
  request.getParameterMap();
  MultiMap<String> queryParameters = request.getQueryParameters();
  if (queryParameters != null) {
    return queryParameters.getString(name);
  } else {
    return null;
  }
}

代码示例来源:origin: apache/incubator-wave

@Override
 public void handle(Callback[] callbacks) throws UnsupportedCallbackException {
  for (Callback c : callbacks) {
   if (c instanceof NameCallback) {
    if (parameters.containsKey(ADDRESS_FIELD)) {
     ((NameCallback) c).setName(parameters.getString(ADDRESS_FIELD));
    }
   } else if (c instanceof PasswordCallback) {
    if (parameters.containsKey(PASSWORD_FIELD)) {
     String password = parameters.getString(PASSWORD_FIELD);
     ((PasswordCallback) c).setPassword(password.toCharArray());
    }
   } else {
    throw new UnsupportedCallbackException(c);
   }
  }
 }
}

代码示例来源:origin: org.eclipse.jetty.osgi/jetty-osgi-boot-warurl

String version = params.getString(Constants.BUNDLE_VERSION);
if (version != null)
String manversion = params.getString(Constants.BUNDLE_MANIFESTVERSION);
if (manversion != null)
String symbname = params.getString(Constants.BUNDLE_SYMBOLICNAME);
if (symbname != null)
String extraBundleClasspath = params.getString(Constants.BUNDLE_CLASSPATH);
String alreadyBundleClasspath = res.get(Constants.BUNDLE_CLASSPATH);
if (alreadyBundleClasspath == null)
String extraImportPackage = params.getString(Constants.IMPORT_PACKAGE);
String alreadyImportPackage = res.get(Constants.IMPORT_PACKAGE);
if (alreadyImportPackage == null)
String extraExportPackage = params.getString(Constants.EXPORT_PACKAGE);
String alreadyExportPackage = res.get(Constants.EXPORT_PACKAGE);
if (extraExportPackage != null)
String webContextPath = params.getString("Web-ContextPath");
if (webContextPath != null)
String jspExtractLocation = params.getString("Web-JSPExtractLocation");
if (jspExtractLocation != null)

相关文章