org.apache.tomcat.util.buf.Ascii.toLower()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(134)

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

Ascii.toLower介绍

[英]Returns the lower case equivalent of the specified ASCII character.
[中]返回指定ASCII字符的小写等效字符。

代码示例

代码示例来源:origin: org.jboss.web/jbossweb

public int hashIgnoreCase() {
int code=0;
for (int i = start; i < end; i++) {
  code = code * 37 + Ascii.toLower(buff[i]);
}
return code;
}

代码示例来源:origin: jboss.web/jbossweb

private static int hashBytesIC( byte bytes[], int start,
        int bytesLen )
{
int max=start+bytesLen;
byte bb[]=bytes;
int code=0;
for (int i = start; i < max ; i++) {
  code = code * 37 + Ascii.toLower(bb[i]);
}
return code;
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/util

private static int hashBytesIC( byte bytes[], int start,
                int bytesLen )
{
  int max=start+bytesLen;
  byte bb[]=bytes;
  int code=0;
  for (int i = start; i < max ; i++) {
    code = code * 37 + Ascii.toLower(bb[i]);
  }
  return code;
}

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

private static int hashBytesIC( byte bytes[], int start,
                int bytesLen )
{
  int max=start+bytesLen;
  byte bb[]=bytes;
  int code=0;
  for (int i = start; i < max ; i++) {
    code = code * 37 + Ascii.toLower(bb[i]);
  }
  return code;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

private static int hashBytesIC( byte bytes[], int start,
                int bytesLen )
{
  int max=start+bytesLen;
  byte bb[]=bytes;
  int code=0;
  for (int i = start; i < max ; i++) {
    code = code * 37 + Ascii.toLower(bb[i]);
  }
  return code;
}

代码示例来源:origin: org.jboss.web/jbossweb

private static int hashBytesIC( byte bytes[], int start,
        int bytesLen )
{
int max=start+bytesLen;
byte bb[]=bytes;
int code=0;
for (int i = start; i < max ; i++) {
  code = code * 37 + Ascii.toLower(bb[i]);
}
return code;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

public int hashIgnoreCase() {
  int code=0;
  for (int i = start; i < end; i++) {
    code = code * 37 + Ascii.toLower(buff[i]);
  }
  return code;
}

代码示例来源:origin: jboss.web/jbossweb

public int hashIgnoreCase() {
int code=0;
for (int i = start; i < end; i++) {
  code = code * 37 + Ascii.toLower(buff[i]);
}
return code;
}

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

public int hashIgnoreCase() {
  int code=0;
  for (int i = start; i < end; i++) {
    code = code * 37 + Ascii.toLower(buff[i]);
  }
  return code;
}

代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote

private static int hashBytesIC( byte bytes[], int start,
                int bytesLen )
{
  int max=start+bytesLen;
  byte bb[]=bytes;
  int code=0;
  for (int i = start; i < max ; i++) {
    code = code * 37 + Ascii.toLower(bb[i]);
  }
  return code;
}

代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
 */
@Deprecated
public int hashIgnoreCase() {
  int code=0;
  for (int i = start; i < end; i++) {
    code = code * 37 + Ascii.toLower(buff[i]);
  }
  return code;
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/util

/**
 * @deprecated Unused. Will be removed in Tomcat 8.0.x onwards.
 */
@Deprecated
public int hashIgnoreCase() {
  int code=0;
  for (int i = start; i < end; i++) {
    code = code * 37 + Ascii.toLower(buff[i]);
  }
  return code;
}

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

/**
 * Returns true if the message bytes starts with the specified string.
 * @param s the string
 */
public boolean startsWithIgnoreCase(String s, int pos) {
  char[] c = buff;
  int len = s.length();
  if (c == null || len+pos > end-start) {
    return false;
  }
  int off = start+pos;
  for (int i = 0; i < len; i++) {
    if (Ascii.toLower( c[off++] ) != Ascii.toLower( s.charAt(i))) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns true if the message bytes starts with the specified string.
 * @param s the string
 */
public boolean startsWithIgnoreCase(String s, int pos) {
  char[] c = buff;
  int len = s.length();
  if (c == null || len+pos > end-start) {
    return false;
  }
  int off = start+pos;
  for (int i = 0; i < len; i++) {
    if (Ascii.toLower( c[off++] ) != Ascii.toLower( s.charAt(i))) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Compares the message bytes to the specified String object.
 * @param s the String to compare
 * @return true if the comparison succeeded, false otherwise
 */
public boolean equalsIgnoreCase(String s) {
  byte[] b = buff;
  int blen = end-start;
  if (b == null || blen != s.length()) {
    return false;
  }
  int boff = start;
  for (int i = 0; i < blen; i++) {
    if (Ascii.toLower(b[boff++]) != Ascii.toLower(s.charAt(i))) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Returns true if the message bytes starts with the specified string.
 * @param s the string
 * @param pos The position
 */
public boolean startsWithIgnoreCase(String s, int pos) {
  byte[] b = buff;
  int len = s.length();
  if (b == null || len+pos > end-start) {
    return false;
  }
  int off = start+pos;
  for (int i = 0; i < len; i++) {
    if (Ascii.toLower( b[off++] ) != Ascii.toLower( s.charAt(i))) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Returns true if the message bytes starts with the specified string.
 * @param s the string
 * @param pos The position
 */
public boolean startsWithIgnoreCase(String s, int pos) {
byte[] b = buff;
int len = s.length();
if (b == null || len+pos > end-start) {
  return false;
}
int off = start+pos;
for (int i = 0; i < len; i++) {
  if (Ascii.toLower( b[off++] ) != Ascii.toLower( s.charAt(i))) {
  return false;
  }
}
return true;
}

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

private int hashIgnoreCase() {
int code=0;
switch (type) {
case T_STR:
  for (int i = 0; i < strValue.length(); i++) {
  code = code * 37 + Ascii.toLower(strValue.charAt( i ));
  }
  return code;
case T_CHARS:
  return charC.hashIgnoreCase();
case T_BYTES:
  return byteC.hashIgnoreCase();
default:
  return 0;
}
}

代码示例来源:origin: jboss.web/jbossweb

private int hashIgnoreCase() {
int code=0;
switch (type) {
case T_STR:
  for (int i = 0; i < strValue.length(); i++) {
  code = code * 37 + Ascii.toLower(strValue.charAt( i ));
  }
  return code;
case T_CHARS:
  return charC.hashIgnoreCase();
case T_BYTES:
  return byteC.hashIgnoreCase();
default:
  return 0;
}
}

代码示例来源:origin: org.jboss.web/jbossweb

private int hashIgnoreCase() {
int code=0;
switch (type) {
case T_STR:
  for (int i = 0; i < strValue.length(); i++) {
  code = code * 37 + Ascii.toLower(strValue.charAt( i ));
  }
  return code;
case T_CHARS:
  return charC.hashIgnoreCase();
case T_BYTES:
  return byteC.hashIgnoreCase();
default:
  return 0;
}
}

相关文章