|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.knowcenter.wag.exactparser.ByteArrayUtils
public abstract class ByteArrayUtils
Abstract class that contains utility methods for handling byte arrays.
Field Summary | |
---|---|
static String |
BYTE_ARRAY_ENCODING
|
Constructor Summary | |
---|---|
ByteArrayUtils()
|
Method Summary | |
---|---|
static boolean |
compareByteArrays(byte[] data,
int index,
byte[] search)
Compares the two byte arrays for equality. |
static boolean |
contains(byte[] byte_array,
byte data)
Checks, if the sought data byte is contained within the byte array. |
static String |
convertByteArrayToString(byte[] data)
Converts the byte array to a String. |
static int |
indexOf(byte[] data,
int index,
byte[] search)
Finds the first occurance of search in data starting to search from the given index. |
static int |
lastIndexOf(byte[] data,
byte[] search)
Finds the last occurance of the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BYTE_ARRAY_ENCODING
Constructor Detail |
---|
public ByteArrayUtils()
Method Detail |
---|
public static String convertByteArrayToString(byte[] data) throws UnsupportedEncodingException
data
- The byte array.
UnsupportedEncodingException
- Forwarded exceptionpublic static int indexOf(byte[] data, int index, byte[] search)
data
- The big array.index
- The index to start searching from.search
- The sought array.
public static int lastIndexOf(byte[] data, byte[] search)
data
- The source array to be searched.search
- The sought array.
public static boolean compareByteArrays(byte[] data, int index, byte[] search)
data
- The source array.index
- In index into the source array marking where the comparison should
start.search
- The sought array.
public static boolean contains(byte[] byte_array, byte data)
byte_array
- The byte array.data
- A data byte sought within the byte array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |