| Constructor | Description |
|---|---|
ByteArray(byte[] ba) |
Constructs a new
ByteArray instance from
the specified data. |
ByteArray(int[] ia) |
Constructs a new
ByteArray instance from the specified data. |
ByteArray(int[] ia,
int from,
int to) |
Constructs a new
ByteArray instance from the
specified data. |
ByteArray(IntList il) |
Constructs a new
ByteArray instance from the specified data. |
ByteArray(IntList il,
int from,
int to) |
Constructs a new
ByteArray instance from the
specified data. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
get(int index) |
Returns the specified array element.
|
int |
size() |
Returns the number of elements in this
IntArray. |
java.lang.String |
toString() |
Returns a string representation of this
IntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object. |
public ByteArray(byte[] ba)
ByteArray instance from
the specified data.ba - an array of integer values between -128 and 127 inclusivejava.lang.NullPointerException - if ba == nullpublic ByteArray(int[] ia)
ByteArray instance from the specified data.ia - an array of integer values between -128 and 127 inclusivejava.lang.IllegalArgumentException - if
(ia[j] < -128 || ia[j] > 127) for any index j
satisfying (j >= 0 && j < ia.length)java.lang.NullPointerException - if ia == nullpublic ByteArray(IntList il)
ByteArray instance from the specified data.il - an list of integer values between -128 and 127 inclusivejava.lang.IllegalArgumentException - if
(il.get(j) < -128 || il.get(j) > 127) for any index j
satisfying (j >= 0 && j < il.size())java.lang.NullPointerException - if il == nullpublic ByteArray(int[] ia,
int from,
int to)
ByteArray instance from the
specified data.ia - an array of integer values between -128 and 127 inclusivefrom - the first element to be included (inclusive)to - the last element to be included (exclusive)java.lang.IllegalArgumentException - if
(ia[j] < -128 || ia[j] > 127) for any index j
satisfying (j >= from && j < to)java.lang.IndexOutOfBoundsException - if from < 0 || to > ia.lengthjava.lang.NegativeArraySizeException - if to > fromjava.lang.NullPointerException - if ia == nullpublic ByteArray(IntList il, int from, int to)
ByteArray instance from the
specified data.il - an list of integer values between -128 and 127 inclusivefrom - the first element to be included (inclusive)to - the last element to be included (exclusive)java.lang.IllegalArgumentException - if
(il.get(j) < -128 || il.get(j) > 127) for any index j
satisfying (j >= from && j < to)java.lang.IndexOutOfBoundsException - if from < 0 || to > il.lengthjava.lang.NegativeArraySizeException - if to > fromjava.lang.NullPointerException - if il == nullpublic int size()
IntArrayIntArray.public int get(int index)
IntArraypublic java.lang.String toString()
IntArrayIntArray by applying
java.utils.Arrays.toString() to an equivalent int[]
object.