本文整理了Java中org.restlet.util.Series.removeFirst()
方法的一些代码示例,展示了Series.removeFirst()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Series.removeFirst()
方法的具体详情如下:
包路径:org.restlet.util.Series
类名称:Series
方法名:removeFirst
[英]Removes from this list the first entry whose name equals the specified name ignoring the case.
[中]从该列表中删除名称等于指定名称的第一个条目,忽略大小写。
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Removes from this list the first entry whose name equals the specified
* name ignoring the case.
*
* @param name
* The name of the entries to be removed (case sensitive).
* @return false if no entry has been removed, true otherwise.
*/
public boolean removeFirst(String name) {
return removeFirst(name, false);
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Removes from this list the first entry whose name equals the specified
* name ignoring the case.
*
* @param name
* The name of the entries to be removed (case sensitive).
* @return false if no entry has been removed, true otherwise.
*/
public boolean removeFirst(String name) {
return removeFirst(name, false);
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Removes from this list the first entry whose name equals the specified
* name ignoring the case.
*
* @param name
* The name of the entries to be removed (case sensitive).
* @return false if no entry has been removed, true otherwise.
*/
public boolean removeFirst(String name) {
return removeFirst(name, false);
}
代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin
/**
* Manipulate Restlet response headers.
*
* This implementation removes the Date and Server headers normally added by Restlet.
*
* @param response
*/
@Override
protected void addResponseHeaders(final HttpResponse response) {
super.addResponseHeaders(response);
final Series<Parameter> responseHeaders = response.getHttpCall()
.getResponseHeaders();
// our servlet container is adding a Date header for all responses
// duplicate Date headers are not allowed by HTTP spec
responseHeaders.removeFirst("Date");
// Nexus is in charge of setting the main Server header
// Restlet would normally add another Server header instead of amending existing one with all products as values
responseHeaders.removeFirst("Server");
}
内容来源于网络,如有侵权,请联系作者删除!