Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tomcat.util.buf
Class Ascii  view Ascii download Ascii.java

java.lang.Object
  extended byorg.apache.tomcat.util.buf.Ascii

public final class Ascii
extends java.lang.Object

This class implements some basic ASCII character handling functions.


Field Summary
private static boolean[] isAlpha
           
private static boolean[] isDigit
           
private static boolean[] isLower
           
private static boolean[] isUpper
           
private static boolean[] isWhite
           
private static byte[] toLower
           
private static byte[] toUpper
           
 
Constructor Summary
Ascii()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

toUpper

private static final byte[] toUpper

toLower

private static final byte[] toLower

isAlpha

private static final boolean[] isAlpha

isUpper

private static final boolean[] isUpper

isLower

private static final boolean[] isLower

isWhite

private static final boolean[] isWhite

isDigit

private static final boolean[] isDigit
Constructor Detail

Ascii

public Ascii()
Method Detail

toUpper

public static int toUpper(int c)
Returns the upper case equivalent of the specified ASCII character.


toLower

public static int toLower(int c)
Returns the lower 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.


isUpper

public static boolean isUpper(int c)
Returns true if the specified ASCII character is upper case.


isLower

public static boolean isLower(int c)
Returns true if the specified ASCII character is lower case.


isWhite

public static boolean isWhite(int c)
Returns true if the specified ASCII character is white space.


isDigit

public static boolean isDigit(int c)
Returns true if the specified ASCII character is a digit.


parseInt

public static int parseInt(byte[] b,
                           int off,
                           int len)
                    throws java.lang.NumberFormatException
Parses an unsigned integer from the specified subarray of bytes.


parseInt

public static int parseInt(char[] b,
                           int off,
                           int len)
                    throws java.lang.NumberFormatException

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.


parseLong

public static long parseLong(char[] b,
                             int off,
                             int len)
                      throws java.lang.NumberFormatException