org.apache.tomcat.util.buf
Class Ascii
java.lang.Object
org.apache.tomcat.util.buf.Ascii
public final class Ascii
extends java.lang.Object
This class implements some basic ASCII character handling functions.
- dac@eng.sun.com
- James Todd [gonzo@eng.sun.com]
static boolean | isAlpha(int c) - Returns true if the specified ASCII character is upper or lower case.
|
static boolean | isDigit(int c) - Returns true if the specified ASCII character is a digit.
|
static boolean | isLower(int c) - Returns true if the specified ASCII character is lower case.
|
static boolean | isUpper(int c) - Returns true if the specified ASCII character is upper case.
|
static boolean | isWhite(int c) - Returns true if the specified ASCII character is white space.
|
static int | parseInt(byte[] b, int off, int len) - Parses an unsigned integer from the specified subarray of bytes.
|
static int | parseInt(char[] b, int off, int len)
|
static long | parseLong(byte[] b, int off, int len) - Parses an unsigned long from the specified subarray of bytes.
|
static long | parseLong(char[] b, int off, int len)
|
static int | toLower(int c) - Returns the lower case equivalent of the specified ASCII character.
|
static int | toUpper(int c) - Returns the upper case equivalent of the specified ASCII character.
|
isAlpha
public static boolean isAlpha(int c)
Returns true if the specified ASCII character is upper or lower case.
isDigit
public static boolean isDigit(int c)
Returns true if the specified ASCII character is a digit.
isLower
public static boolean isLower(int c)
Returns true if the specified ASCII character is lower case.
isUpper
public static boolean isUpper(int c)
Returns true if the specified ASCII character is upper case.
isWhite
public static boolean isWhite(int c)
Returns true if the specified ASCII character is white space.
parseInt
public static int parseInt(byte[] b,
int off,
int len)
throws NumberFormatException
Parses an unsigned integer from the specified subarray of bytes.
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytes
parseInt
public static int parseInt(char[] b,
int off,
int len)
throws NumberFormatException
parseLong
public static long parseLong(byte[] b,
int off,
int len)
throws NumberFormatException
Parses an unsigned long from the specified subarray of bytes.
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytes
parseLong
public static long parseLong(char[] b,
int off,
int len)
throws NumberFormatException
toLower
public static int toLower(int c)
Returns the lower case equivalent of the specified ASCII character.
toUpper
public static int toUpper(int c)
Returns the upper case equivalent of the specified ASCII character.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.