Top Description Fields Constructors Methods
org.apache.tomcat.util.buf

public final Class Ascii

extends Object
Class Inheritance

This class implements some basic ASCII character handling functions.
Authors
[email protected], James Todd [[email protected]]

Field Summary

Modifier and TypeField and Description
private static final boolean[]
private static final long
private static final byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static boolean

Returns:

true if the specified ASCII character is a digit.
isDigit
(int
The char
c
)

public static long

Returns:

the long value
parseLong
(byte[]
the bytes to parse
b
,
int
the start offset of the bytes
off
,
int
the length of the bytes
len
)

Parses an unsigned long from the specified subarray of bytes.

public static int

Returns:

the lower case equivalent char
toLower
(int
The char
c
)

Returns the lower case equivalent of the specified ASCII character.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isDigitback to summary
private static final boolean[] isDigit
OVERFLOW_LIMITback to summary
private static final long OVERFLOW_LIMIT
toLowerback to summary
private static final byte[] toLower

Constructor Detail

Asciiback to summary
public Ascii()

Method Detail

isDigitback to summary
private static boolean isDigit(int c)
Parameters
c:int

The char

Returns:boolean

true if the specified ASCII character is a digit.

parseLongback to summary
public static long parseLong(byte[] b, int off, int len) throws NumberFormatException

Parses an unsigned long from the specified subarray of bytes.

Parameters
b:byte[]

the bytes to parse

off:int

the start offset of the bytes

len:int

the length of the bytes

Returns:long

the long value

Exceptions
NumberFormatException:
if the long format was invalid
toLowerback to summary
public static int toLower(int c)

Returns the lower case equivalent of the specified ASCII character.

Parameters
c:int

The char

Returns:int

the lower case equivalent char