|
Esri Geoportal Server 1.0
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.gpt.framework.util.Val
public class Val
Provides basic validation and conversion support.
| Method Summary | |
|---|---|
static boolean |
chkBool(String s,
boolean defaultVal)
Converts a string to a boolean value. |
static double |
chkDbl(String s,
double defaultVal)
Converts a string to a double value. |
static boolean |
chkEmail(String s)
Check a string to see if it matches an email address. |
static int |
chkInt(String s,
int defaultVal)
Converts a string to an int value. |
static long |
chkLong(String s,
long defaultVal)
Converts a string to a long value. |
static String |
chkStr(String s)
Check a string value. |
static String |
chkStr(String s,
int maxLength)
Check a string value and ensures that it does not exceed a maximum length. |
static String |
chkStr(String s,
String defaultVal)
Check a string value. |
static String |
chkUrl(String url)
Checks a string if it's a alid URL. |
static String |
escapeSingleQuotes(String s)
Escapes single and quotes within a string. |
static String |
escapeStrForJson(String text)
Escapes arbitrary text into a JSON escaped string. |
static String |
escapeXml(String s)
Escapes special xml characters within a string. |
static String |
escapeXmlForBrowser(String s)
Escapes special xml characters within a string. |
static String |
removeBOM(String s)
Removes a windows byte order mark if present. |
static String[] |
tokenize(String tokens,
String delimiter)
Tokenizes a delimited string into a string array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean chkBool(String s,
boolean defaultVal)
s - the string to convertdefaultVal - the default value to return if the string is invalid
public static double chkDbl(String s,
double defaultVal)
s - the string to convertdefaultVal - the default value to return if the string is invalid
public static boolean chkEmail(String s)
s - the string to check
public static String chkUrl(String url)
url - string to check
public static int chkInt(String s,
int defaultVal)
s - the string to convertdefaultVal - the default value to return if the string is invalid
public static long chkLong(String s,
long defaultVal)
s - the string to convertdefaultVal - the default value to return if the string is invalid
public static String chkStr(String s)
s - the string to check
public static String chkStr(String s,
String defaultVal)
s - the string to checkdefaultVal - the default value to return if the string is null or empty
public static String chkStr(String s,
int maxLength)
s - the string to checkmaxLength - the maximum length for the string
public static String escapeSingleQuotes(String s)
s - the string to escape
public static String escapeXml(String s)
s - the string to escape
public static String escapeXmlForBrowser(String s)
s - the string to escape
public static String escapeStrForJson(String text)
text - text to escape
public static String removeBOM(String s)
s - the string to check
public static String[] tokenize(String tokens,
String delimiter)
tokens - the delimited string to tokenizedelimiter - the delimiter
|
Esri Geoportal Server 1.0
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||