getFileForFilename(String filename) Convenience method to get a File for the specified filename.
public static int
getIntValueForProperty(Properties props, String propName, int defaultValue) Convenience method to extract an integer property value from a Properties file.
replaceAll(String theString, String toReplace, String replacement) Replaces each substring of this string that matches toReplace.
Used to replace replaceAll when using J2SDK 1.3.1.
This method is available at String.replaceAll in J2SDK 1.4
Parameters: theString - The string to use Parameters: toReplace - The string to replace. Parameters: replacement - The replacement string.
Utility to tell if two strings are the same. Extends the basic
String 'equals' method by allowing for nulls.
Parameters: str1 - The first string Parameters: str2 - The second string Whether the strings are equal.
booleanArrayToString
public static String booleanArrayToString(boolean[] ba)(Code)
Utility to convert a boolean[] to a String.
Parameters: ba - The boolean[] String version
Converts the given collection of objects to string as a comma-separated
list. If the list is empty the string "<none>" is returned.
Parameters: coll - collection of objects to be converted A string containing each object in the given collection,converted toString() and separated by commas.
getDecodedStringFromURLString
public static String getDecodedStringFromURLString(String urlString)(Code)
Convenience method to decode a URL string for use (so spaces are allowed)
Parameters: urlString - The URL string The string
Convenience method to get a File for the specified filename.
Caters for URL-encoded characters in the filename (treatment of spaces on Windows etc)
Parameters: filename - Name of file The File
getIntValueForProperty
public static int getIntValueForProperty(Properties props, String propName, int defaultValue)(Code)
Convenience method to extract an integer property value from a Properties file.
Parameters: props - The Properties Parameters: propName - Name of the property Parameters: defaultValue - The default value to use (in case not specified) The value
Convenience method to get a JarFile for the specified filename.
Caters for URL-encoded characters in the filename (treatment of spaces on Windows etc)
Parameters: filename - Name of file The JarFile
check string is null or length is 0.
Parameters: s - check string return true if string is null or length is 0. return false other case.
isValidJavaIdentifierForJDOQL
public static boolean isValidJavaIdentifierForJDOQL(String s)(Code)
Utility to check if a name is a valid Java identifier.
Used by JDOQL in validating the names of parameters/variables.
Parameters: s - The name Whether it is a valid identifier in Java.
isWhitespace
public static boolean isWhitespace(String str)(Code)
Utility to check if a string is whitespace.
If the string is null, returns true also.
Parameters: str - The string to check Whether the string is just whitespace
leftAlignedPaddedString
public static String leftAlignedPaddedString(String input, int length)(Code)
Utility to return a left-aligned version of a string padded to the
number of characters specified.
Parameters: input - The input string Parameters: length - The length desired The updated string
check string isnot null and length > 0.
Parameters: s - check string return true if string isnot null and length greater than 0. return false other case.
Replaces each substring of this string that matches toReplace.
Used to replace replaceAll when using J2SDK 1.3.1.
This method is available at String.replaceAll in J2SDK 1.4
Parameters: theString - The string to use Parameters: toReplace - The string to replace. Parameters: replacement - The replacement string. The updated string after replacing.
rightAlignedPaddedString
public static String rightAlignedPaddedString(String input, int length)(Code)
Utility to return a right-aligned version of a string padded to the
number of characters specified.
Parameters: input - The input string Parameters: length - The length desired The updated string
Utility to convert an object to a JVM type string.
Returns the same as would have been output from Object.toString() if the class hadn't overridden it.
Parameters: obj - The object The String version