|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.ByteUtils
A set of static methods to manipulate byte arrays.
| Constructor Summary | |
ByteUtils()
Deprecated. |
|
| Method Summary | |
static String |
byteArrayToHexString(byte[] bytes)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replaced with ByteUtils.byteArrayToHexString(byte[]). |
static byte[] |
calcMD5(byte[] data,
int len)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replaced with DigestUtils.calcMD5(byte[], int). |
static boolean |
equal(byte[] array1,
byte[] array2)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Use: java.util.Arrays.equals(byte[] a, byte[] a2). |
static byte[] |
hexStringToByteArray(String hex_string)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Replaced with ByteUtils.hexStringToByteArray(String). |
static int |
indexOf(byte[] b,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. Use: java.util.Arrays.binarySearch(byte[] a, byte key). |
static int |
indexOf(byte[] b,
int len,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
static int |
indexOf(byte[] b,
int offset,
int len,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
static boolean |
isEmpty(byte[] array)
Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement. |
static int |
strip(byte[] b,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
static int |
strip(byte[] b,
int len,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
static int |
strip(byte[] b,
int offset,
int len,
byte byte_value)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
static byte[] |
trimCapacity(byte[] data,
int len)
Deprecated. as of version 4.5, to be removed in 8.0 or later. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ByteUtils()
| Method Detail |
public static String byteArrayToHexString(byte[] bytes)
ByteUtils.byteArrayToHexString(byte[]).
bytes - Byte array to convertpublic static byte[] hexStringToByteArray(String hex_string)
ByteUtils.hexStringToByteArray(String).
hex_string - String containing valid hexadecimal characters
public static boolean equal(byte[] array1,
byte[] array2)
java.util.Arrays.equals(byte[] a, byte[] a2).
array1 - First byte arrayarray2 - Second byte array
public static byte[] calcMD5(byte[] data,
int len)
DigestUtils.calcMD5(byte[], int).
data - Byte array containing the data to uselen - Number of bytes in the array - must be less than the array
lengthpublic static boolean isEmpty(byte[] array)
array - Byte array to test
public static int strip(byte[] b,
byte byte_value)
b - Byte arraybyte_value - Value to be removed
public static int strip(byte[] b,
int len,
byte byte_value)
b - Byte arraylen - Number of elements to searchbyte_value - Value to be removed
public static int strip(byte[] b,
int offset,
int len,
byte byte_value)
b - Byte arrayoffset - Starting element to be searched for the valuelen - Number of elements to searchbyte_value - Value to be removed
public static int indexOf(byte[] b,
byte byte_value)
java.util.Arrays.binarySearch(byte[] a, byte key).
b - Byte arraybyte_value - Value to be locatedbyte_value
if found; otherwise, -1
public static int indexOf(byte[] b,
int len,
byte byte_value)
b - Byte arraylen - Number of elements to searchbyte_value - Value to search forbyte_value
if found; otherwise, -1
public static int indexOf(byte[] b,
int offset,
int len,
byte byte_value)
b - Byte arrayoffset - Starting element for the searchlen - Number of elements to searchbyte_value - Value to search forbyte_value
if found; otherwise, -1
public static byte[] trimCapacity(byte[] data,
int len)
data - Byte arraylen - Index of the last element to be included in the new arraylen; otherwise, the original array
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||