|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.marre.util.StringUtil
Various functions to encode and decode strings.
Method Summary | |
static java.lang.String |
bytesToHexString(byte[] theData)
Converts a byte array to a string with hex values. |
static java.lang.String |
byteToHexString(byte theByte)
Converts a byte to a string with hex values. |
static int |
findString(java.lang.String[] stringTable,
java.lang.String text)
|
static byte[] |
hexStringToBytes(java.lang.String theHexString)
Converts a string of hex characters to a byte array. |
static java.lang.String |
intToString(int value,
int nChars)
Method intToString. |
static java.lang.String |
randString(int length)
Generates a random string of the given length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int findString(java.lang.String[] stringTable, java.lang.String text)
stringTable
- text
-
public static java.lang.String bytesToHexString(byte[] theData)
theData
- Data to convert
public static java.lang.String byteToHexString(byte theByte)
theByte
- Byte to convert
public static byte[] hexStringToBytes(java.lang.String theHexString)
theHexString
- The hex string to read
public static java.lang.String intToString(int value, int nChars)
value
- Integer valuenChars
- Number of chars to represent the "value"
public static java.lang.String randString(int length)
length
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |