|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.jini.config.ConfigUtil
A set of static convenience methods for use in configuration files. This class cannot be instantiated.
ConfigurationFile| Method Summary | |
static String |
concat(Object[] objects)
Concatenate the strings resulting from calling String.valueOf(Object) on each element of
an array of objects. |
static String |
getHostName()
Return the local hostname. |
static String |
stringLiteral(String string)
Returns a String whose characters, if parsed by a
ConfigurationFile, would yield a
String equivalent to the passed argument. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String concat(Object[] objects)
String.valueOf(Object) on each element of
an array of objects. Passing a zero length array will result in
the empty string being returned.
objects - the array of objects to be processed.
String.valueOf on each element of
objects.
NullPointerException - if objects
is null.
public static String getHostName()
throws UnknownHostException
UnknownHostException - if no IP address for the local
host could be found.public static String stringLiteral(String string)
String whose characters, if parsed by a
ConfigurationFile, would yield a
String equivalent to the passed argument. This is
done by replacing CR and LF with their escape codes, quoting
'\' and '"' with '\', and enclosing the entire sequence in
double quotes. Additionally the tab, form feed, and backspace
characters will be converted to their escape codes and other control
characters (besides CR and LF) to octal escapes for better readability
if the string is printed for debugging purposes.
string - the string to turn into a string literal
String that if parsed as sequence of
of characters by ConfigurationFile would
yield a String equivalent to string
NullPointerException - if string is
null
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||