|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rapplogic.xbee.util.ByteUtils
public class ByteUtils
Method Summary | |
---|---|
static int[] |
convertInttoMultiByte(int val)
Works for positive values only |
static int |
convertMultiByteToInt(int[] bytes)
There is a slight problem with this method that you might have noticed; a Java int is signed, so we can't make use of the 32nd bit. |
static java.lang.String |
formatByte(int b)
|
static boolean |
getBit(int b,
int position)
Returns true if the bit is on (1) at the specified position Position range: 1-8 |
static int |
parse10BitAnalog(IIntInputStream in,
int pos)
|
static int |
parse10BitAnalog(int msb,
int lsb)
Parses a 10-bit analog value from the input stream |
static int[] |
stringToIntArray(java.lang.String s)
|
static java.lang.String |
toBase10(int[] arr)
|
static java.lang.String |
toBase16(int b)
|
static java.lang.String |
toBase16(int[] arr)
|
static java.lang.String |
toBase16(int[] arr,
java.lang.String delimiter)
|
static java.lang.String |
toBase2(int b)
|
static java.lang.String |
toBase2(int[] arr)
|
static java.lang.String |
toChar(int[] arr)
Deprecated. use toString(int[] arr) |
static java.lang.String |
toString(int[] arr)
Converts an int array to string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int convertMultiByteToInt(int[] bytes)
public static int[] convertInttoMultiByte(int val)
val
-
public static java.lang.String toBase16(int[] arr)
public static java.lang.String toBase16(int[] arr, java.lang.String delimiter)
public static java.lang.String toBase2(int[] arr)
public static java.lang.String toBase10(int[] arr)
public static java.lang.String toChar(int[] arr)
public static java.lang.String toString(int[] arr)
arr
-
public static boolean getBit(int b, int position)
public static java.lang.String toBase16(int b)
public static java.lang.String toBase2(int b)
public static java.lang.String formatByte(int b)
public static int[] stringToIntArray(java.lang.String s)
public static int parse10BitAnalog(int msb, int lsb) throws java.io.IOException
java.io.IOException
public static int parse10BitAnalog(IIntInputStream in, int pos) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |