|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.ioModel.BitSetConverter
public final class BitSetConverter
Converter for java BitSet. Converts numbers and arrays into bitset and vice versa.
| Method Summary | |
|---|---|
static void |
convertIntNumber(long number,
int bitSize,
BitSet bits)
Converts an integer number of the specified size into a BitSet. |
static BitSet |
fromByteArray(byte[] bytes)
Returns a BitSet containing the values in bytes. |
static byte[] |
toByteArray(BitSet bits)
Returns a byte array of at least length 1. |
static byte[] |
toByteArray(BitSet bits,
int arraySize)
Returns a byte array with the length of the specified array size. |
static long |
toIntNumber(BitSet bits,
boolean signed,
int bitSize)
Converts a BitSet to an integer number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BitSet fromByteArray(byte[] bytes)
bytes - byte array containing the data to convert. The byte-ordering of bytes must be little-endian which
means the least significant bit is in element 0.
public static byte[] toByteArray(BitSet bits)
bits - BitSet containing the data to converts
public static byte[] toByteArray(BitSet bits,
int arraySize)
bits - BitSet containing the data to convertsarraySize - size of the array to be returned
IllegalStateException - if arraySize is not big enough for BitSet data
public static void convertIntNumber(long number,
int bitSize,
BitSet bits)
number - the number to convertbitSize - the size of the numberbits - the result bitSet
public static long toIntNumber(BitSet bits,
boolean signed,
int bitSize)
bits - the BitSet to convert.signed - true if resulting number should be signed, false if unsignedbitSize - size in bits of the bitSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||