javax.servlet.http.HttpServletRequestWrapper.getIntHeader()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(173)

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

HttpServletRequestWrapper.getIntHeader介绍

[英]The default behavior of this method is to return getIntHeader(String name) on the wrapped request object.
[中]此方法的默认行为是在包装的请求对象上返回GetInHeader(字符串名称)。

代码示例

代码示例来源:origin: cloudfoundry/uaa

@Override
public int getIntHeader(String name) {
  return super.getIntHeader(name);
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public int getIntHeader(final String name)
{
  int intHeader = super.getIntHeader(name);
  return intHeader;
}

代码示例来源:origin: com.github.wuic/wuic-servlet

/**
 * {@inheritDoc}
 */
@Override
public int getIntHeader(final String name) {
  // Synchronized access
  synchronized (mutex) {
    return super.getIntHeader(name);
  }
}

代码示例来源:origin: org.jasig.portal/uPortal-spring

@Override
  public int getIntHeader(String name) {
    if ("REMOTE_USER".equals(name)) {
      return Integer.valueOf(remoteUser);
    }
    return super.getIntHeader(name);
  }
};

代码示例来源:origin: org.icefaces/icefaces-ace

public int getIntHeader(java.lang.String name) {
  if (name != null) {
    if (name.equals(FACES_REQUEST))
      throw new NumberFormatException("Can not convert " + FACES_REQUEST + " to integer");
    else if (name.equals(CONTENT_TYPE))
      throw new NumberFormatException("Can not convert " + CONTENT_TYPE + " to integer");
  }
  return super.getIntHeader(name);
}

代码示例来源:origin: nu.validator/validator

/**
 * @see javax.servlet.http.HttpServletRequestWrapper#getIntHeader(java.lang.String)
 */
@Override
public int getIntHeader(String name) {
  if ("Content-Length".equalsIgnoreCase(name)) {
    return -1;
  } else if ("Content-MD5".equalsIgnoreCase(name)) {
    return -1;
  } else if ("Content-Encoding".equalsIgnoreCase(name)) {
    return -1;
  } else {
    return super.getIntHeader(name);
  }
}

代码示例来源:origin: nu.validator/validator

/**
 * @see javax.servlet.http.HttpServletRequestWrapper#getIntHeader(java.lang.String)
 */
@Override
public int getIntHeader(String name) {
  if ("Content-Length".equalsIgnoreCase(name)) {
    return -1;
  } else if ("Content-MD5".equalsIgnoreCase(name)) {
    return -1;
  } else if ("Content-Encoding".equalsIgnoreCase(name)) {
    return -1;
  } else if ("Content-Type".equalsIgnoreCase(name)) {
    return -1;
  } else {
    return super.getIntHeader(name);
  }
}

代码示例来源:origin: Jasig/uPortal

@Override
public int getIntHeader(String name) {
  this.checkState();
  return super.getIntHeader(name);
}

代码示例来源:origin: org.jasig.portal/uPortal-rendering

@Override
public int getIntHeader(String name) {
  this.checkState();
  return super.getIntHeader(name);
}

代码示例来源:origin: org.keycloak/keycloak-servlet-adapter-spi

@Override
public int getIntHeader(String name) {
  if (!needRequestRestore) return super.getIntHeader(name);
  String value = getHeader(name);
  if (value == null) return -1;
  return Integer.valueOf(value);
}

代码示例来源:origin: com.github.ziplet/ziplet

@Override
public int getIntHeader(String header) {
  return isFilteredHeader(header) ? -1 : super.getIntHeader(header);
}

代码示例来源:origin: org.apache.wink/wink-server

@Override
public int getIntHeader(String name) {
  return getCorrectRequest().getIntHeader(name);
}

代码示例来源:origin: ziplet/ziplet

@Override
public int getIntHeader(String header) {
  return isFilteredHeader(header) ? -1 : super.getIntHeader(header);
}

代码示例来源:origin: rpatil26/webutilities

@Override
public int getIntHeader(String header) {
  return skippedHeader(header) ? -1 : super.getIntHeader(header);
}

代码示例来源:origin: io.dropwizard/dropwizard-jetty

/**
 * The default behavior of this method is to return
 * getIntHeader(String name) on the wrapped request object.
 *
 * @param name a <code>String</code> specifying the name of a request header
 */
@Override
public int getIntHeader(final String name) {
  if (headerNames.contains(name)) {
    return -1;
  } else {
    return super.getIntHeader(name);
  }
}

代码示例来源:origin: org.jvnet.hudson.winstone/winstone

public int getIntHeader(String name) {
  if (hasBeenForwarded()) {
    return super.getIntHeader(name);
  } else {
    String header = getHeader(name);
    return header == null ? -1 : Integer.parseInt(header);
  }
}

相关文章

HttpServletRequestWrapper类方法