com.ibm.ras
Class RASUtil
- java.lang.Object
-
- com.ibm.ras.RASUtil
-
Deprecated.As of WAS 6.0, recommend using java.util.logging
public class RASUtil extends java.lang.ObjectRASUtilcontains utility methods used by the RAS Toolkit.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringRAS_MSG_CATDeprecated.The name of the catalog containing RAS messages.static RASMessageCatalograsMsgsDeprecated.The catalog containing RAS messages and strings to be displayed.
-
Constructor Summary
Constructors Constructor and Description RASUtil()Deprecated.
-
Method Summary
Methods Modifier and Type Method and Description static java.util.VectorarrayToVector(java.lang.Object[] array)Deprecated.Converts an array to aVector.static java.lang.Object[]checkNullObjects(java.lang.Object[] inserts)Deprecated.Checks the array of inserts fornullobjects and inserts a string in the place of each such object.static java.lang.ObjectcreateObject(java.lang.String name)Deprecated.Creates anObjectfrom its class name.static voiderrorMsg(java.lang.String msg)Deprecated.Writes a message toSystem.err.static java.lang.StringgetConsoleCodePage()Deprecated.Gets the code page to use when writing to the console.static java.lang.Stringleft(java.lang.String input, int length)Deprecated.Returns a string containing the left-mostlengthcharacters ofinput.static java.lang.Stringleft(java.lang.String input, int length, java.lang.String pad)Deprecated.Returns a string containing the left-mostlengthcharacters ofinput.static booleanmakePath(java.lang.String fileName)Deprecated.Creates the parent directories of a file.static java.util.VectorstringToVector(java.lang.String source)Deprecated.Converts aStringof blank-delimited strings to aVectorofStrings.static java.lang.StringvectorToString(java.util.Vector source)Deprecated.Converts aVectorofStringsto a single line with elements separated by a single blank.
-
-
-
Field Detail
-
RAS_MSG_CAT
public static final java.lang.String RAS_MSG_CAT
Deprecated.The name of the catalog containing RAS messages.- See Also:
- Constant Field Values
-
rasMsgs
public static RASMessageCatalog rasMsgs
Deprecated.The catalog containing RAS messages and strings to be displayed.
-
-
Method Detail
-
checkNullObjects
public static java.lang.Object[] checkNullObjects(java.lang.Object[] inserts)
Deprecated.Checks the array of inserts fornullobjects and inserts a string in the place of each such object.- Parameters:
inserts- The array of inserts to be checked.- Returns:
- The same array, updated to remove null objects.
-
createObject
public static java.lang.Object createObject(java.lang.String name)
Deprecated.Creates anObjectfrom its class name.- Parameters:
name- The fully-qualified name of the object.- Returns:
- The object, or
nullif the requested object could not be created.
-
errorMsg
public static void errorMsg(java.lang.String msg)
Deprecated.Writes a message toSystem.err. This method compensates for a Java bug (4038677) which displays non-ISO Latin/1 characters in the wrong code page.- Parameters:
msg- The message to be written toSystem.err.
-
getConsoleCodePage
public static java.lang.String getConsoleCodePage()
Deprecated.Gets the code page to use when writing to the console. On Windows platforms, because of a Java bug (4038677), the non-ISO Latin/1 characters are displayed in the wrong code page. The problem only appears in single-byte character sets. The bypass is to specify the correct code page.- Returns:
- The proper code page for writing to the console, based on the
default locale, or
nullif the default code page is correct.
-
left
public static java.lang.String left(java.lang.String input, int length, java.lang.String pad)Deprecated.Returns a string containing the left-mostlengthcharacters ofinput. The string is padded withpadcharacters, or truncated as needed.- Parameters:
input- The string to be padded or truncated.length- The length of the final string.pad- The character to be used for padding the string- Returns:
- The altered string.
-
left
public static java.lang.String left(java.lang.String input, int length)Deprecated.Returns a string containing the left-mostlengthcharacters ofinput. The string is padded with blanks, or truncated as needed.- Parameters:
input- The string to be padded or truncated.length- The length of the final string.- Returns:
- The altered string.
-
makePath
public static boolean makePath(java.lang.String fileName) throws java.lang.SecurityExceptionDeprecated.Creates the parent directories of a file. The path separator may be a front-slash ('/') or the platform-specific path separator character. For example:/Dir1/Dir2/Dir3/MyStuff.log
- Parameters:
fileName- The name of the file whose path is to be created.- Returns:
trueif the patch was created orfalse,- Throws:
java.lang.SecurityException- This runtime exception is thrown if a security manager is installed and a security violation is detected.
-
arrayToVector
public static java.util.Vector arrayToVector(java.lang.Object[] array)
Deprecated.Converts an array to aVector. This method is useful in logging aVectorbecauseVector.toStringdisplays information on each of the object's elements, wheretoStringon an array does not.- Parameters:
array- The source array to convert.- Returns:
- The
Vectorequivalent ornullif the source array isnull.
-
stringToVector
public static java.util.Vector stringToVector(java.lang.String source)
Deprecated.Converts aStringof blank-delimited strings to aVectorofStrings.- Parameters:
source- The sourceStringto convert.- Returns:
- The
Vectorequivalent ornullif the sourceStringisnull.
-
vectorToString
public static java.lang.String vectorToString(java.util.Vector source)
Deprecated.Converts aVectorofStringsto a single line with elements separated by a single blank.- Parameters:
source- The sourceVectorofStringsto convert.- Returns:
- The
Stringequivalent ornullif the sourceVectorisnull.
-
-