|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jini.config.ConfigUtil
public class 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 ServiceID |
createServiceID(String s)
Returns a ServiceID constructed from a 128-bit value
represented by a string. |
static String |
getHostAddress()
Returns the textual presentation of the local host IP address. |
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 getHostAddress() 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
public static ServiceID createServiceID(String s)
ServiceID
constructed from a 128-bit value
represented by a string. The supplied string representation must
be in the format defined by
ServiceID.toString
,
except that uppercase hexadecimal digits are allowed.
s
- the string representation to create the ServiceID
with
ServiceID
with the value represented by the
given string
IllegalArgumentException
- if the supplied string
representation does not conform to the specified format
NullPointerException
- if s
is
null
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |