本文整理了Java中org.apache.tomcat.util.buf.Ascii
类的一些代码示例,展示了Ascii
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ascii
类的具体详情如下:
包路径:org.apache.tomcat.util.buf.Ascii
类名称:Ascii
[英]This class implements some basic ASCII character handling functions.
[中]此类实现了一些基本的ASCII字符处理函数。
代码示例来源: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.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
public long getLong() {
return Ascii.parseLong(buff, start, end - start);
}
代码示例来源:origin: jboss.web/jbossweb
public int getInt()
{
return Ascii.parseInt(buff, start,
end-start);
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public static int parseInt(char[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public static int parseInt(char[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源: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: jboss.web/jbossweb
public static int parseInt(char[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源:origin: codefollower/Tomcat-Research
public long getLong() {
return Ascii.parseLong(buff, start,end-start);
}
代码示例来源:origin: org.jboss.web/jbossweb
public int getInt()
{
return Ascii.parseInt(buff, start,
end-start);
}
代码示例来源: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: org.jboss.web/jbossweb
public static int parseInt(char[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/util
public long getLong() {
return Ascii.parseLong(buff, start,end-start);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public int getInt()
{
return Ascii.parseInt(buff, start,
end-start);
}
代码示例来源: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.jboss.web/jbossweb
/**
* Parses an unsigned integer from the specified subarray of bytes.
* @param b the bytes to parse
* @param off the start offset of the bytes
* @param len the length of the bytes
* @exception NumberFormatException if the integer format was invalid
*/
public static int parseInt(byte[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public long getLong() {
return Ascii.parseLong(buff, start,end-start);
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public int getInt()
{
return Ascii.parseInt(buff, start,
end-start);
}
代码示例来源: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: jboss.web/jbossweb
/**
* Parses an unsigned integer from the specified subarray of bytes.
* @param b the bytes to parse
* @param off the start offset of the bytes
* @param len the length of the bytes
* @exception NumberFormatException if the integer format was invalid
*/
public static int parseInt(byte[] b, int off, int len)
throws NumberFormatException
{
int c;
if (b == null || len <= 0 || !isDigit(c = b[off++])) {
throw new NumberFormatException();
}
int n = c - '0';
while (--len > 0) {
if (!isDigit(c = b[off++])) {
throw new NumberFormatException();
}
n = n * 10 + c - '0';
}
return n;
}
代码示例来源:origin: org.jboss.web/jbossweb
public long getLong() {
return Ascii.parseLong(buff, start,end-start);
}
内容来源于网络,如有侵权,请联系作者删除!