Package 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.- Author:
- dac@eng.sun.com, James Todd [gonzo@eng.sun.com]
-
-
Constructor Summary
Constructors Constructor Description Ascii()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
parseLong(byte[] b, int off, int len)
Parses an unsigned long from the specified subarray of bytes.static int
toLower(int c)
Returns the lower case equivalent of the specified ASCII character.
-
-
-
Method Detail
-
toLower
public static int toLower(int c)
Returns the lower case equivalent of the specified ASCII character.- Parameters:
c
- The char- Returns:
- the lower case equivalent char
-
parseLong
public static long parseLong(byte[] b, int off, int len) throws java.lang.NumberFormatException
Parses an unsigned long from the specified subarray of bytes.- Parameters:
b
- the bytes to parseoff
- the start offset of the byteslen
- the length of the bytes- Returns:
- the long value
- Throws:
java.lang.NumberFormatException
- if the long format was invalid
-
-