|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.ws.security.util.ByteArray
public class ByteArray
This module is a utility class to work with byte arrays. It performs initialization, copies and compares byte arrays.
Constructor Summary | |
---|---|
ByteArray(byte[] barray)
Default constructor Returns a ByteArray given a byte[] |
Method Summary | |
---|---|
static boolean |
compare(byte[] a,
byte[] b)
The compare method compares the byte arrays for equality. |
static void |
copy(byte[] from,
int offsetFrom,
int len,
byte[] to,
int offsetTo)
The copy method copies data of length len
from the array from to the array to ,
from the offset offsetFrom to the offset offsetTo . |
boolean |
equals(java.lang.Object arrayObj)
The equals method determines if the
array object passed in is equal to another array. |
byte[] |
getArray()
The getArray method returns a byte array
of type byte []. |
int |
hashCode()
The hashCode method determines the hash of an array. |
static void |
initialize(byte[] array,
byte val)
The initialize method initializes the array to a given value. |
void |
setArray(byte[] array)
The setArray method sets the byte array
of type byte[]. |
static byte[] |
XOR(byte[] a,
byte b)
The XOR method performs the xor function of two byte arrays. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArray(byte[] barray)
Default constructor
Returns a ByteArray given a byte[]
the
- array to convert into ByteArrayMethod Detail |
---|
public byte[] getArray()
The getArray
method returns a byte array
of type byte [].
public void setArray(byte[] array)
The setArray
method sets the byte array
of type byte[].
the
- byte[] arraypublic boolean equals(java.lang.Object arrayObj)
The equals
method determines if the
array object passed in is equal to another array.
equals
in class java.lang.Object
the
- array object
public int hashCode()
The hashCode
method determines the hash of an array.
hashCode
in class java.lang.Object
public static void initialize(byte[] array, byte val)
The initialize
method initializes the array to a given value.
the
- array to initializethe
- valuepublic static void copy(byte[] from, int offsetFrom, int len, byte[] to, int offsetTo)
The copy
method copies data of length len
from the array from
to the array to
,
from the offset offsetFrom
to the offset offsetTo
.
the
- input arraythe
- offset for the input arraythe
- length to copythe
- output arraythe
- offset for the output arraypublic static boolean compare(byte[] a, byte[] b)
compare
method compares the byte arrays for equality.
first
- byte arraysecond
- byte array
public static byte[] XOR(byte[] a, byte b)
XOR
method performs the xor function of two byte arrays.
first
- byte arraysecond
- byte array
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |