本文整理了Java中org.mortbay.jetty.HttpConnection.getRequestFields()
方法的一些代码示例,展示了HttpConnection.getRequestFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpConnection.getRequestFields()
方法的具体详情如下:
包路径:org.mortbay.jetty.HttpConnection
类名称:HttpConnection
方法名:getRequestFields
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void setContentType(String contentType)
{
_connection.getRequestFields().put(HttpHeaders.CONTENT_TYPE_BUFFER,contentType);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public Enumeration getHeaderNames()
{
return _connection.getRequestFields().getFieldNames();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public long getDateHeader(String name)
{
return _connection.getRequestFields().getDateField(name);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public int getIntHeader(String name)
{
return (int)_connection.getRequestFields().getLongField(name);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public String getHeader(String name)
{
return _connection.getRequestFields().getStringField(name);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public Enumeration getHeaders(String name)
{
Enumeration e = _connection.getRequestFields().getValues(name);
if (e==null)
return Collections.enumeration(Collections.EMPTY_LIST);
return e;
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public int getContentLength()
{
return (int)_connection.getRequestFields().getLongField(HttpHeaders.CONTENT_LENGTH_BUFFER);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public String getContentType()
{
return _connection.getRequestFields().getStringField(HttpHeaders.CONTENT_TYPE_BUFFER);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public Locale getLocale()
Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.ACCEPT_LANGUAGE, HttpFields.__separators);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public String toString()
{
return getMethod()+" "+_uri+" "+getProtocol()+"\n"+
_connection.getRequestFields().toString();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public Enumeration getLocales()
Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.ACCEPT_LANGUAGE, HttpFields.__separators);
代码示例来源:origin: org.restlet/org.restlet.ext.jetty
/**
* Returns the list of request headers.
*
* @return The list of request headers.
*/
@Override
@SuppressWarnings("unchecked")
public Series<Parameter> getRequestHeaders() {
final Series<Parameter> result = super.getRequestHeaders();
if (!this.requestHeadersAdded) {
// Copy the headers from the request object
String headerName;
String headerValue;
for (final Enumeration<String> names = getConnection()
.getRequestFields().getFieldNames(); names
.hasMoreElements();) {
headerName = names.nextElement();
for (final Enumeration<String> values = getConnection()
.getRequestFields().getValues(headerName); values
.hasMoreElements();) {
headerValue = values.nextElement();
result.add(new Parameter(headerName, headerValue));
}
}
this.requestHeadersAdded = true;
}
return result;
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (!_connection.getRequestFields().containsKey(HttpHeaders.COOKIE_BUFFER))
Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.COOKIE_BUFFER);
while (enm.hasMoreElements())
Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.COOKIE_BUFFER);
while (enm.hasMoreElements())
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
Buffer hostPort = _connection.getRequestFields().get(HttpHeaders.HOST_BUFFER);
if (hostPort!=null)
代码示例来源:origin: org.jboss.errai/errai-cdi-jetty
Iterator<Field> headerFields = request.getConnection().getRequestFields().getFields();
while (headerFields.hasNext()) {
Field headerField = headerFields.next();
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
String connection=_connection.getRequestFields().getStringField(HttpHeaders.CONNECTION_BUFFER);
if (connection!=null)
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
_connection.getRequestFields().remove(HttpHeaders.CONTENT_TYPE_BUFFER);
_connection.getRequestFields().remove(HttpHeaders.CONTENT_LENGTH_BUFFER);
_characterEncoding=null;
_mimeType=null;
内容来源于网络,如有侵权,请联系作者删除!