|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ras.RASUtil
RASUtil contains utility methods used by the RAS Toolkit.
Field Summary | |
---|---|
static java.lang.String |
RAS_MSG_CAT
The name of the catalog containing RAS messages. |
static RASMessageCatalog |
rasMsgs
The catalog containing RAS messages and strings to be displayed. |
Constructor Summary | |
---|---|
RASUtil()
|
Method Summary | |
---|---|
static java.util.Vector |
arrayToVector(java.lang.Object[] array)
Converts an array to a Vector. |
static java.lang.Object[] |
checkNullObjects(java.lang.Object[] inserts)
Checks the array of inserts for null objects and inserts a string in the place of each such object. |
static java.lang.Object |
createObject(java.lang.String name)
Creates an Object from its class name. |
static void |
errorMsg(java.lang.String msg)
Writes a message to System.err. |
static java.lang.String |
getConsoleCodePage()
Gets the code page to use when writing to the console. |
static java.lang.String |
left(java.lang.String input,
int length)
Returns a string containing the left-most length characters of input. |
static java.lang.String |
left(java.lang.String input,
int length,
java.lang.String pad)
Returns a string containing the left-most length characters of input. |
static boolean |
makePath(java.lang.String fileName)
Creates the parent directories of a file. |
static java.util.Vector |
stringToVector(java.lang.String source)
Converts a String of blank-delimited strings to a Vector of Strings . |
static java.lang.String |
vectorToString(java.util.Vector source)
Converts a Vector of Strings to a single line
with elements separated by a single blank. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String RAS_MSG_CAT
public static RASMessageCatalog rasMsgs
Constructor Detail |
public RASUtil()
Method Detail |
public static java.lang.Object[] checkNullObjects(java.lang.Object[] inserts)
inserts
- The array of inserts to be checked.public static java.lang.Object createObject(java.lang.String name)
name
- The fully-qualified name of the object.public static void errorMsg(java.lang.String msg)
msg
- The message to be written to System.err.public static java.lang.String getConsoleCodePage()
public static java.lang.String left(java.lang.String input, int length, java.lang.String pad)
pad
characters, or truncated as needed.input
- The string to be padded or truncated.length
- The length of the final string.pad
- The character to be used for padding the stringpublic static java.lang.String left(java.lang.String input, int length)
input
- The string to be padded or truncated.length
- The length of the final string.public static boolean makePath(java.lang.String fileName) throws java.lang.SecurityException
/Dir1/Dir2/Dir3/MyStuff.log
fileName
- The name of the file whose path is to be created.false
,java.lang.SecurityException
- This runtime exception is thrown if a security manager is installed and
a security violation is detected.public static java.util.Vector arrayToVector(java.lang.Object[] array)
Vector.toString
displays information on each of the object's elements, where
toString on an array does not.array
- The source array to convert.null
if the
source array is null.public static java.util.Vector stringToVector(java.lang.String source)
Strings
.source
- The source String to convert.Vector
equivalent or null
if the
source String is null
.public static java.lang.String vectorToString(java.util.Vector source)
Strings
to a single line
with elements separated by a single blank.source
- The source Vector of Strings
to
convert.null
if the
source Vector is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |