|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ungoverned.osgi.bundle.httpadmin.util.Text
A simple utility class - helper for strings
Constructor Summary | |
Text()
|
Method Summary | |
static java.lang.String |
hexString(byte value)
Creates hex string from byte value. |
static java.lang.String |
hexString(int value)
Creates hex string from int value. |
static java.lang.String |
hexString(int value,
int length)
Hex string with the given mininum length. |
static boolean |
isEmptyString(java.lang.String s)
Checks if string is empty - either null or "" |
static byte[] |
readResource(java.lang.Object obj,
java.lang.String file)
Simple file reader with non-blocking io. |
static java.lang.String |
readTextResource(java.lang.Object obj,
java.lang.String file)
Simple file reader with non-blocking io. |
static java.lang.String |
replaceString(java.lang.String source,
java.lang.String find,
java.lang.String replace)
This static method is simple search and replace engine. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Text()
Method Detail |
public static java.lang.String hexString(byte value)
byte
value. The result string is 2 chars long String.
value
- byte to convert to hex string
public static java.lang.String hexString(int value)
int
value. The result string is 4 chars long String.
value
- int to convert to hex string
public static java.lang.String hexString(int value, int length)
value
- int to convert to hex stringlength
- the minimum length of returned string.
public static java.lang.String replaceString(java.lang.String source, java.lang.String find, java.lang.String replace)
source
- is the source stringfind
- is the search string to be replaced.replace
- is replaces string.public static byte[] readResource(java.lang.Object obj, java.lang.String file)
obj
- ANY object that can be used for base. template name is
relative to that object. (see getResourceAsStream)file
- name of resource file.
public static java.lang.String readTextResource(java.lang.Object obj, java.lang.String file)
obj
- ANY object that can be used for base. template name is
relative to that object. (see getResourceAsStream)file
- name of resource file.
public static boolean isEmptyString(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |