|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pow2.util.Util
Utility class.
Constructor Summary | |
Util()
|
Method Summary | |
static String |
addURLParameter(String URL,
String parameter)
Add a new parameter to the input URL string representation. |
static String |
addURLParameter(String URL,
String paramName,
String paramValue)
Add a new parameter to the input URL string representation. |
static String |
dbString(String v)
Delimit the input string with single quote characters ('). |
static String |
dumpHashTable(Hashtable table,
boolean html)
Dump the content of the input hash table. |
static String |
getLastToken(String str,
String tokenSeparator)
Get the last token from the input string. |
static boolean |
isNull(String s)
Test if the input string is null or empty (has 0 characters) |
static boolean |
isNull(String s,
String val)
Test if the input string is null or empty or if it's equal to the input val parameter. |
static String |
remove(String str,
String until)
Remove the substring starting from the first character of the input string to the input until string included. |
static String |
stackTrace(Throwable t)
Return the string representation of the input exception stack trace. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static String getLastToken(String str, String tokenSeparator)
str
- the string containing the tokentokenSeparator
- the token separator string (i.e.: "'", ":", etc)
public static boolean isNull(String s)
s
- the input string to test
public static boolean isNull(String s, String val)
val
parameter.
s
- the input string to testval
- the value string to compare to s
s
is null, or empty, or if it's
equal to the val
string;
false otherwise.public static String stackTrace(Throwable t)
t
- the input throwable object
public static String dbString(String v)
v
- The new string value
public static String dumpHashTable(Hashtable table, boolean html)
table
- table the hash table to dumphtml
- true to set the eof as "public static String addURLParameter(String URL, String paramName, String paramValue)
URL
- the URL string representationparamName
- the parameter nameparamValue
- the parameter valuepublic static String addURLParameter(String URL, String parameter)
URL
- the URL string representationparameter
- the parameter string, encoded as "${paramName}=${paramValue}"public static String remove(String str, String until)
until
string included.
str
- the string to processuntil
- the string to reach (it will removed, too)
until
string,
or null if until
token isn't found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |