YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
org.fourthline.cling.model.ModelUtil Class Reference

Shared trivial procedures. More...

Collaboration diagram for org.fourthline.cling.model.ModelUtil:
Collaboration graph

Static Public Member Functions

static boolean isStringConvertibleType (Set< Class > stringConvertibleTypes, Class clazz)
 
static boolean isValidUDAName (String name)
 
static InetAddress getInetAddressByName (String name)
 Wraps the checked exception in a runtime exception.
 
static String toCommaSeparatedList (Object[] o)
 Converts the given instances into comma-separated elements of a string, escaping commas with backslashes.
 
static String toCommaSeparatedList (Object[] o, boolean escapeCommas, boolean escapeDoubleQuotes)
 Converts the given instances into comma-separated elements of a string, optionally escapes commas and double quotes with backslahses.
 
static String[] fromCommaSeparatedList (String s)
 Converts the comma-separated elements of a string into an array of strings, unescaping backslashed commas.
 
static String[] fromCommaSeparatedList (String s, boolean unescapeCommas)
 Converts the comma-separated elements of a string into an array of strings, optionally unescaping backslashed commas.
 
static String toTimeString (long seconds)
 
static long fromTimeString (String s)
 
static String commaToNewline (String s)
 
static String getLocalHostName (boolean includeDomain)
 DNS reverse name lookup.
 
static byte[] getFirstNetworkInterfaceHardwareAddress ()
 

Static Public Attributes

final static boolean ANDROID_RUNTIME
 True if this class is executing on an Android runtime.
 
final static boolean ANDROID_EMULATOR
 True if this class is executing on an Android emulator runtime.
 

Detailed Description

Shared trivial procedures.

Author
Christian Bauer

Member Function Documentation

◆ commaToNewline()

static String org.fourthline.cling.model.ModelUtil.commaToNewline ( String  s)
static
Parameters
sA string with commas.
Returns
The same string, a newline appended after every comma.

◆ fromTimeString()

static long org.fourthline.cling.model.ModelUtil.fromTimeString ( String  s)
static
Parameters
sA string representing hours, minutes, seconds, e.g. 11:23:44
Returns
The converted number of seconds.

◆ getFirstNetworkInterfaceHardwareAddress()

static byte[] org.fourthline.cling.model.ModelUtil.getFirstNetworkInterfaceHardwareAddress ( )
static
Returns
The MAC hardware address of the first network interface of this host.

Referenced by org.fourthline.cling.model.types.UDN.uniqueSystemIdentifier().

Here is the caller graph for this function:

◆ getLocalHostName()

static String org.fourthline.cling.model.ModelUtil.getLocalHostName ( boolean  includeDomain)
static

DNS reverse name lookup.

Parameters
includeDomaintrue if the whole FQDN should be returned, instead of just the first (host) part.
Returns
The resolved host (and domain-) name, or "UNKNOWN HOST" if resolution failed.

◆ isStringConvertibleType()

static boolean org.fourthline.cling.model.ModelUtil.isStringConvertibleType ( Set< Class >  stringConvertibleTypes,
Class  clazz 
)
static
Parameters
stringConvertibleTypesA collection of interfaces.
clazzAn interface to test.
Returns
true if the given interface is an Enum, or if the collection contains a super-interface.

◆ isValidUDAName()

static boolean org.fourthline.cling.model.ModelUtil.isValidUDAName ( String  name)
static
Parameters
nameA UPnP device architecture "name" string.
Returns
true if the name is not empty, doesn't start with "xml", and matches org.fourthline.cling.model.Constants#REGEX_UDA_NAME.

Referenced by org.fourthline.cling.model.meta.Action< S extends Service >.validate(), org.fourthline.cling.model.meta.ActionArgument< S extends Service >.validate(), and org.fourthline.cling.model.meta.StateVariable< S extends Service >.validate().

Here is the caller graph for this function:

◆ toTimeString()

static String org.fourthline.cling.model.ModelUtil.toTimeString ( long  seconds)
static
Parameters
secondsThe number of seconds to convert.
Returns
A string representing hours, minutes, seconds, e.g. 11:23:44

The documentation for this class was generated from the following file: