public class Util
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Vector | arrayToVector(java.lang.Object[] arr)
Converts an array to a vector of string.
|
static void | chmod(java.lang.String strFile, java.lang.String strPerm, boolean recursive)
Change file permission on UNIX system.
|
static void | chmoddeep400(java.lang.String path, java.lang.String perm, java.lang.String start, java.lang.String server, java.lang.String user, java.lang.String pwd)
Change file permission on remote i5/OS server.
|
static boolean | compareStrings(java.lang.String x, java.lang.String y)
Compares the two strings after any space is trimmed.
|
static java.lang.String | convertFilename(java.lang.String filename)
Converts separators '/' and '.' to File.separator.
|
static boolean | convertToBoolean(java.lang.Object value)
Converts the given string to a boolean value.
|
static java.util.Hashtable | convertToHashtable(java.lang.Object key, java.lang.Object x)
Converts an object to a Hashtable.
|
static java.util.Vector | convertToVector(java.lang.Object x)
Converts an object to a Vector.
|
static java.io.File | copyFile(java.lang.String fileInput, java.lang.String fileOutput)
Makes a copy of input file to an output file.
|
static java.util.Hashtable | copyHashtable(java.util.Hashtable table)
Makes a recursive copy of a hashtable.
|
static java.util.Vector | copyVector(java.util.Vector v)
Makes a recursive copy of a vector.
|
static java.io.File | findFile(java.lang.String filename, java.lang.String path)
Searches the given path for the given file name.
|
static java.io.File | findFileFromClassLoader(java.lang.String filename)
Searches the given file name using the class loader's classpath.
|
static java.util.Hashtable | flatten(java.util.Hashtable h1, java.util.Hashtable h2)
Consolidates the given hashtables into a single hashtable.
|
static java.util.Hashtable | getAllRoles()
Reads all roles (member groups) from Roles.xml into a hashtable.
|
static java.util.Vector | getRoles(UserAccessBean uab, java.lang.Long owner_id)
Reads the roles for a particular user on a particular store.
|
static java.lang.String | hexToString(java.lang.String text)
This method takes a hexadecimal string and returns the corresponding character String object.
|
static java.lang.String | insert(java.lang.String target, java.lang.String insertStr, int pos)
Inserts a given substring at a given position
|
static boolean | isAS400OS()
Checks whether the operating system is AS/400.
|
static boolean | isDoubleByteLocale(java.util.Locale locale)
Checks to see whether the locale is a double-byte character.
|
static boolean | isIE(javax.servlet.http.HttpServletRequest request)
Checks to see whether the browser is Internet Explorer.
|
static boolean | isLinuxOS()
Checks whether the operating system is Linux.
|
static boolean | isLowerCase(java.lang.String target)
Tests to see if a string is lower case.
|
static boolean | isLowerCase(java.lang.String str, int start, int length)
Tests to see if a substring is lower case.
|
static boolean | isNetscape(javax.servlet.http.HttpServletRequest request)
Checks to see whether the browser is Netscape.
|
static boolean | isUnixOS()
Checks whether the operating system is UNIX.
|
static boolean | isUpperCase(java.lang.String str)
Tests to see if a string is upper case.
|
static boolean | isUpperCase(java.lang.String str, int start, int length)
Tests to see if a substring is upper case.
|
static boolean | isWindowsOS()
Checks whether the operating system is Windows.
|
static java.util.Vector | merge(java.lang.Object value1, java.lang.Object value2)
Merges the given objects into a single vector.
|
static int | occurencesOf(java.lang.String target)
Returns the number of occurrences of " \t\n".
|
static int | occurencesOf(java.lang.String target, java.lang.String characters)
Returns the number of occurrences of a substring.
|
static java.lang.String | replace(java.lang.String source, char pattern, char replacement)
Replaces the occurrences of a given pattern character with a given replacement character in the source string.
|
static java.lang.String | replace(java.lang.String source, java.lang.String pattern, java.lang.String replacement)
Replaces the occurrences of a given pattern string with a given replacement string in the source string.
|
static java.lang.String | reverse(java.lang.String source)
Returns the reversal of the source string.
|
static void | setLastXMLPath(java.lang.String xmlPath)
Deprecated.
|
static java.lang.String | stringToHex(java.lang.String text)
Converts the given string to a hexadecimal representation.
|
static java.lang.String | strip(java.lang.String target)
Strips the leading and trailing characters.
|
static java.lang.String | stripLeading(java.lang.String target)
Strips leading characters " \t\n".
|
static java.lang.String | stripLeading(java.lang.String target, java.lang.String characters)
Strips the given leading characters.
|
static java.lang.String | stripTrailing(java.lang.String target)
Strips trailing characters " \t\n".
|
static java.lang.String | stripTrailing(java.lang.String target, java.lang.String characters)
Strips the given trailing characters.
|
static java.lang.String[] | tokenize(java.lang.String source, java.lang.String delimiter)
Tokenizes a string.
|
public static final java.util.Vector arrayToVector(java.lang.Object[] arr)
public static final boolean compareStrings(java.lang.String x, java.lang.String y)
public static final java.lang.String convertFilename(java.lang.String filename)
public static final boolean convertToBoolean(java.lang.Object value)
public static final java.util.Hashtable convertToHashtable(java.lang.Object key, java.lang.Object x)
public static final java.util.Vector convertToVector(java.lang.Object x)
public static final java.io.File copyFile(java.lang.String fileInput, java.lang.String fileOutput) throws java.io.IOException
public static final java.util.Hashtable copyHashtable(java.util.Hashtable table)
public static final java.util.Vector copyVector(java.util.Vector v)
public static final java.io.File findFile(java.lang.String filename, java.lang.String path)
public static final java.io.File findFileFromClassLoader(java.lang.String filename)
public static final java.util.Hashtable flatten(java.util.Hashtable h1, java.util.Hashtable h2)
public static final java.util.Hashtable getAllRoles() throws ECSystemException
public static final java.util.Vector getRoles(UserAccessBean uab, java.lang.Long owner_id) throws ECSystemException
public static final java.lang.String hexToString(java.lang.String text)
public static final java.lang.String insert(java.lang.String target, java.lang.String insertStr, int pos)
public static boolean isAS400OS()
public static boolean isDoubleByteLocale(java.util.Locale locale)
public static boolean isIE(javax.servlet.http.HttpServletRequest request)
public static final boolean isLowerCase(java.lang.String target)
public static final boolean isLowerCase(java.lang.String str, int start, int length)
public static boolean isNetscape(javax.servlet.http.HttpServletRequest request)
public static boolean isUnixOS()
public static boolean isLinuxOS()
public static final boolean isUpperCase(java.lang.String str)
public static final boolean isUpperCase(java.lang.String str, int start, int length)
public static boolean isWindowsOS()
public static final java.util.Vector merge(java.lang.Object value1, java.lang.Object value2)
public static final int occurencesOf(java.lang.String target)
public static final int occurencesOf(java.lang.String target, java.lang.String characters)
public static final java.lang.String replace(java.lang.String source, char pattern, char replacement)
public static final java.lang.String replace(java.lang.String source, java.lang.String pattern, java.lang.String replacement)
public static final java.lang.String reverse(java.lang.String source)
public static final java.lang.String stringToHex(java.lang.String text)
public static final java.lang.String strip(java.lang.String target)
public static final java.lang.String stripLeading(java.lang.String target)
public static final java.lang.String stripLeading(java.lang.String target, java.lang.String characters)
public static final java.lang.String stripTrailing(java.lang.String target)
public static final java.lang.String stripTrailing(java.lang.String target, java.lang.String characters)
public static java.lang.String[] tokenize(java.lang.String source, java.lang.String delimiter)
public static void setLastXMLPath(java.lang.String xmlPath)
public static void chmod(java.lang.String strFile, java.lang.String strPerm, boolean recursive) throws java.io.IOException, java.lang.InterruptedException
public static void chmoddeep400(java.lang.String path, java.lang.String perm, java.lang.String start, java.lang.String server, java.lang.String user, java.lang.String pwd) throws ECSystemException, com.ibm.as400.access.AS400SecurityException, com.ibm.as400.access.ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, java.beans.PropertyVetoException