|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--MicroTAPAS.util.Util
A collection of utilities for the TAPAS support functions
| Field Summary | |
private static Debug |
debug
Reference to the debug server. |
static java.lang.String |
LF
LineFeed contstant. |
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static java.lang.String |
boolToString(boolean b)
Convert to textual representation of boolean values |
static int[] |
centerScreen(int x,
int y)
Calculates the coordinates of the upper left corner of the window so that it is placed in the middle of the screen. |
static java.lang.String[] |
concatStringArrays(java.lang.String[] first,
java.lang.String[] second)
Function to concatenate string arrays. |
static java.lang.String |
exceptionDump(java.lang.Exception ex)
Function to convert an exception stack dump to a string representation |
static CapabilitySet |
getActorCapabilitySet(java.lang.String file)
The method to retrieve the REQUIRED capabilities of an actor. |
static java.util.Hashtable |
getActorProperties(java.lang.String file)
Method to return an actor's properties as a hashtable. |
static CapabilitySet |
getNodeCapabilitySet()
The method to retrieve the capabilities of a node from the 'nodecap' file. |
static GAI |
getPropertyGAI(java.lang.String key)
Method to return one specific microtapas property as a GAI |
static java.lang.String |
getPropertyString(java.lang.String key)
Method to return one specific microtapas property as a String |
static int[] |
getScreenSize()
Method to return the size of the terminal's screen. |
static java.util.Hashtable |
getTAPASProperties()
Method to feth the TAPAS specific properties only |
static java.lang.String |
millisToHours(long time)
Method to convert a long of milliseconds to a String on the form 'Xh, Ymin, Zsec'. |
private static java.lang.String |
padInt(int i)
|
static java.lang.String |
replace(java.lang.String haystack,
java.lang.String needle,
java.lang.String replacement)
Replaces the FIRST occurance of 'needle' with 'repalcement' in 'haystack' The J2SE v1.4.1 String String.replaceFirst(String regexp, String replacement) and String String.replaceAll(String regexp, String replacement) are not defined in the J9 API for PocketPC. |
static java.lang.String |
replaceAll(java.lang.String haystack,
java.lang.String needle,
java.lang.String replacement)
Replaces the ALL occurances of 'needle' with 'repalcement' in 'haystack'. |
static void |
replaceProperty(java.lang.String key,
java.lang.String element)
Replaces one specific property. |
static boolean |
stringToBool(java.lang.String s)
Conversion from string boolean representation to boolean value |
static java.lang.String |
timestampToDate(long time)
Utilitiy to transform a timestamp (long) to a human readable date. |
static java.lang.String |
toString(java.lang.String[] pStrings,
java.lang.String separator)
Converts an array of Strings into one concatenated String with a specified separator String in between |
static java.util.Hashtable |
updateProperties(java.util.Hashtable ht)
Update system properties with TAPAS parameters |
| 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 LF
private static Debug debug
| Constructor Detail |
public Util()
| Method Detail |
public static java.lang.String replace(java.lang.String haystack,
java.lang.String needle,
java.lang.String replacement)
public static java.lang.String replaceAll(java.lang.String haystack,
java.lang.String needle,
java.lang.String replacement)
public static java.lang.String toString(java.lang.String[] pStrings,
java.lang.String separator)
pStrings - To array of Strings to be concatenatedseparator - A String to be placed in between
public static java.lang.String boolToString(boolean b)
b - The boolean value to convert
public static boolean stringToBool(java.lang.String s)
s - The string boolean value to convert
public static java.lang.String[] concatStringArrays(java.lang.String[] first,
java.lang.String[] second)
first - First arraysecond - Second array
public static java.lang.String exceptionDump(java.lang.Exception ex)
ex - The exception to retrieve the trace from
public static java.lang.String timestampToDate(long time)
time - The timestamp in milliseconds.
private static java.lang.String padInt(int i)
public static java.lang.String millisToHours(long time)
time - The time in milliseconds to be converted into a String,
public static int[] centerScreen(int x,
int y)
x - Width of windowy - Height of window
public static int[] getScreenSize()
public static java.util.Hashtable updateProperties(java.util.Hashtable ht)
ht - The Hashtable of properties to be added
public static void replaceProperty(java.lang.String key,
java.lang.String element)
key - The key of the propertyelement - The replacement propertypublic static java.util.Hashtable getTAPASProperties()
public static GAI getPropertyGAI(java.lang.String key)
key - The property key
public static java.lang.String getPropertyString(java.lang.String key)
key - The property key
public static java.util.Hashtable getActorProperties(java.lang.String file)
file - The path/URL of the property/config file.
public static CapabilitySet getNodeCapabilitySet()
public static CapabilitySet getActorCapabilitySet(java.lang.String file)
file - The path/URL address of the file containing the capabilities.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||