|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jpalm.Utilities
public class Utilities
Utility methods for the jpalm package.
| Method Summary | |
|---|---|
static java.lang.String |
byteArrayToHexString(byte[] bytes)
Converts a byte array to a hexadecimal string. |
static java.lang.String |
byteToHexString(byte bite)
Converts a byte to a hexadecimal string. |
static int |
indexOf(byte[] bytes,
int start,
byte value)
Gets the index of the first occurrence of value in bytes. |
static boolean |
isEqual(byte[] one,
byte[] two)
Determines if two byte arrays are equal. |
static boolean |
isMatch(java.lang.String string,
java.lang.String regex)
Determines if a string matches a regular expression. |
static byte[] |
subbyte(byte[] bytes,
int start,
int length)
Gets a new byte array that is a subset of bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String byteArrayToHexString(byte[] bytes)
byte array to a hexadecimal string. Hexadecimal letters are
lowercase.
bytes - a byte array to convert
public static java.lang.String byteToHexString(byte bite)
byte to a hexadecimal string. Hexadecimal letters are lowercase.
bite - a byte to convert
public static byte[] subbyte(byte[] bytes,
int start,
int length)
bytes.
bytes - the byte array to substart - the start indexlength - the number of bytes to include
public static int indexOf(byte[] bytes,
int start,
byte value)
value in bytes.
bytes - the byte arraystart - the index to start searching fromvalue - the value to search for
value or -1 if value could
not be found.
public static boolean isMatch(java.lang.String string,
java.lang.String regex)
string - the string to testregex - the regular expression
true if the string matches; false otherwise
public static boolean isEqual(byte[] one,
byte[] two)
one - a byte arraytwo - a byte array
true if the arrays are equal; false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||