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.Object
RASUtil
contains utility methods used by the RAS Toolkit.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
RAS_MSG_CAT
Deprecated.The name of the catalog containing RAS messages.static RASMessageCatalog
rasMsgs
Deprecated.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.Vector
arrayToVector(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 fornull
objects and inserts a string in the place of each such object.static java.lang.Object
createObject(java.lang.String name)
Deprecated.Creates anObject
from its class name.static void
errorMsg(java.lang.String msg)
Deprecated.Writes a message toSystem.err
.static java.lang.String
getConsoleCodePage()
Deprecated.Gets the code page to use when writing to the console.static java.lang.String
left(java.lang.String input, int length)
Deprecated.Returns a string containing the left-mostlength
characters ofinput
.static java.lang.String
left(java.lang.String input, int length, java.lang.String pad)
Deprecated.Returns a string containing the left-mostlength
characters ofinput
.static boolean
makePath(java.lang.String fileName)
Deprecated.Creates the parent directories of a file.static java.util.Vector
stringToVector(java.lang.String source)
Deprecated.Converts aString
of blank-delimited strings to aVector
ofStrings
.static java.lang.String
vectorToString(java.util.Vector source)
Deprecated.Converts aVector
ofStrings
to 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 fornull
objects 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 anObject
from its class name.- Parameters:
name
- The fully-qualified name of the object.- Returns:
- The object, or
null
if 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
null
if 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-mostlength
characters ofinput
. The string is padded withpad
characters, 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-mostlength
characters 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.SecurityException
Deprecated.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:
true
if 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 aVector
becauseVector.toString
displays information on each of the object's elements, wheretoString
on an array does not.- Parameters:
array
- The source array to convert.- Returns:
- The
Vector
equivalent ornull
if the source array isnull
.
-
stringToVector
public static java.util.Vector stringToVector(java.lang.String source)
Deprecated.Converts aString
of blank-delimited strings to aVector
ofStrings
.- Parameters:
source
- The sourceString
to convert.- Returns:
- The
Vector
equivalent ornull
if the sourceString
isnull
.
-
vectorToString
public static java.lang.String vectorToString(java.util.Vector source)
Deprecated.Converts aVector
ofStrings
to a single line with elements separated by a single blank.- Parameters:
source
- The sourceVector
ofStrings
to convert.- Returns:
- The
String
equivalent ornull
if the sourceVector
isnull
.
-
-