|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.ddmlib.utils.ArrayHelper
public final class ArrayHelper
Utility class providing array to int/long conversion for data received from devices through adb.
| Constructor Summary | |
|---|---|
ArrayHelper()
|
|
| Method Summary | |
|---|---|
static int |
swap32bitFromArray(byte[] value,
int offset)
Reads a signed 32 bit integer from an array coming from a device. |
static void |
swap32bitsToArray(int value,
byte[] dest,
int offset)
Swaps an unsigned value around, and puts the result in an array that can be sent to a device. |
static long |
swap64bitFromArray(byte[] value,
int offset)
Reads a signed 64 bit integer from an array coming from a device. |
static int |
swapU16bitFromArray(byte[] value,
int offset)
Reads an unsigned 16 bit integer from an array coming from a device, and returns it as an 'int' |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayHelper()
| Method Detail |
|---|
public static void swap32bitsToArray(int value,
byte[] dest,
int offset)
value - The value to swap.dest - the destination arrayoffset - the offset in the array where to put the swapped value.
Array length must be at least offset + 4
public static int swap32bitFromArray(byte[] value,
int offset)
value - the array containing the intoffset - the offset in the array at which the int starts
public static int swapU16bitFromArray(byte[] value,
int offset)
value - the array containing the 16 bit int (2 byte).offset - the offset in the array at which the int starts
Array length must be at least offset + 2
public static long swap64bitFromArray(byte[] value,
int offset)
value - the array containing the intoffset - the offset in the array at which the int starts
Array length must be at least offset + 8
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||