|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rakeshv.tex.ISOToASCII
public final class ISOToASCII
Implements a HashMap that maps non-ASCII
ISO character entities to their plain ASCII
equivalents.
See ISO Character Entities for a full description of the character entities.
Copyright © 2002 Rakesh Vidyadharan
| Field Summary | |
|---|---|
static boolean |
DO_NULL_CHECK
Specify that if no match is found for the specified character, in HashMap, return the input character as its
String equivalent. |
private static java.util.Map |
map
The HashMap that holds the character mappings. |
static boolean |
STRICT_ASCII
Constant that indicates that a strict ASCII conversion is desired. |
private static java.util.Map |
strictMap
The HashMap that hold the strict character mappings. |
| Constructor Summary | |
|---|---|
private |
ISOToASCII()
Private constructor. |
| Method Summary | |
|---|---|
static java.lang.String |
convertString(java.lang.String inString)
Convert all ISO 8859-1 encoded non-ASCII characters to appropriate ASCII characters (or strings), and return the modified String object. |
static java.lang.String |
convertString(java.lang.String inString,
boolean strict)
Convert all ISO 8859-1 encoded non-ASCII characters to appropriate ASCII characters (or strings), and return the modified String object. |
static java.lang.String |
getASCIIEquivalent(char input)
Returns the ASCII equivalent for the specified char. |
static java.lang.String |
getASCIIEquivalent(char input,
boolean checkFlag)
Returns the ASCII equivalent for the specified char. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DO_NULL_CHECK
HashMap, return the input character as its
String equivalent.
public static final boolean STRICT_ASCII
private static java.util.Map map
HashMap that holds the character mappings.
private static java.util.Map strictMap
HashMap that hold the strict character mappings.
| Constructor Detail |
|---|
private ISOToASCII()
| Method Detail |
|---|
public static java.lang.String getASCIIEquivalent(char input)
Returns the ASCII
equivalent for the specified char.
If the input character equivalent is not found, this
method returns null. You will need to check
the return value in your code.
input - - The character that is to be transformed.
public static java.lang.String getASCIIEquivalent(char input,
boolean checkFlag)
Returns the ASCII
equivalent for the specified char.
If the input character equivalent is not found, and
checkFlag is specified as DO_NULL_CHECK,
then, a String representation of the input
character is returned.
input - - The character that is to be transformed.checkFlag - - Specify that checking for existence
of ASCII equivalent should be done in the method or not. To
enable checking, specify DO_NULL_CHECK.
public static java.lang.String convertString(java.lang.String inString)
Convert all ISO 8859-1 encoded non-ASCII characters to
appropriate ASCII characters (or strings), and return the
modified String object.
inString - - The String object that is to be modified.
public static java.lang.String convertString(java.lang.String inString,
boolean strict)
String object. When strict
conversion is specified special characters that do not have
direct ASCII equivalents, will be suppressed.
inString - - The String object that is to be modified.strict - - Specified whether strict conversion is to be
performed. Use STRICT_ASCII to
specify preference.
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||