splitString(String str, char delimiter) Split a string based on the given delimiter, but don't remove
empty elements.
Parameters: str - The string to be split. Parameters: delimiter - Split string based on this delimiter. Array of split strings.
splitString(String str, char delimiter, boolean removeEmpty) Split a string based on the given delimiter, optionally removing
empty elements.
Parameters: str - The string to be split. Parameters: delimiter - Split string based on this delimiter. Parameters: removeEmpty - If true then remove empty elements. Array of split strings.
Change the passed class name to its corresponding file name. E.G.
change "Utilities" to "Utilities.class".
Parameters: name - Class name to be changed. throws: IllegalArgumentException - If a null name passed.
Change the passed file name to its corresponding class name. E.G.
change "Utilities.class" to "Utilities".
Parameters: name - Class name to be changed. If this does not representa Java class then null is returned. throws: IllegalArgumentException - If a null name passed.
Clean the passed string. Replace whitespace characters with a single
space. If a null string passed return an empty string. E.G.
replace
[pre]
\t\tselect\t* from\t\ttab01
[/pre]
with
[pre]
select * from tab01
[/pre]
Parameters: str - String to be cleaned. Cleaned string.
Creates a clone of any serializable object. Collections and arrays
may be cloned if the entries are serializable.
Caution super class members are not cloned if a super class is not serializable.
closeReader
public static void closeReader(Reader reader)(Code)
Closes the specified Reader which can be null. Logs an error if
an exception occurs while closing.
Parameters: reader - the Reader to close.
formatSize
public static String formatSize(long longSize)(Code)
formatSize
public static String formatSize(long longSize, int decimalPos)(Code)
Return the suffix of the passed file name.
Parameters: fileName - File name to retrieve suffix for. Suffix for fileName or an empty stringif unable to get the suffix. throws: IllegalArgumentException - if null file name passed.
Remove the suffix from the passed file name.
Parameters: fileName - File name to remove suffix from. fileName without a suffix. throws: IllegalArgumentException - if null file name passed.
Internationalizes a line with an embedded I18n key in it. Suppose that
the line looks like:
This is a line with a embeddedKey in it.
Further suppose the our I18NStrings.properties has the line:
embeddedKey=(string that all would like to read)
This method will return the value:
This is a line with a (string that all would like to read) in it.
Note: This method cannot currently handle more than one embedded I18n
string in the specified line at this time. Please put multiple
keys on separate lines. Otherwise, truncation of the specified
line could result!
Parameters: line - the line to internationalize Parameters: s_stringMgr - the StringManager to use to lookup I18N keys. an internationalized replacement for this line
Split a string based on the given delimiter, but don't remove
empty elements.
Parameters: str - The string to be split. Parameters: delimiter - Split string based on this delimiter. Array of split strings. Guaranteeded to be not null.
splitString
public static String[] splitString(String str, char delimiter, boolean removeEmpty)(Code)
Split a string based on the given delimiter, optionally removing
empty elements.
Parameters: str - The string to be split. Parameters: delimiter - Split string based on this delimiter. Parameters: removeEmpty - If true then remove empty elements. Array of split strings. Guaranteeded to be not null.