|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.llrp.ltk.types.LLRPType org.llrp.ltk.types.UnsignedByteArray
public class UnsignedByteArray
Array of unsigned bytes. Length encoded in first 16 bits of binary encoding
Field Summary | |
---|---|
protected UnsignedByte[] |
bytes
|
protected boolean |
signed
|
protected java.lang.Integer |
value
|
Constructor Summary | |
---|---|
UnsignedByteArray()
Creates an empty UnsignedByteArray. |
|
UnsignedByteArray(byte[] bytes)
Creates a new UnsignedByteArray object. |
|
UnsignedByteArray(org.jdom.Element element)
Creates a new UnsignedByteArray object from jdom element - used for xml decoding |
|
UnsignedByteArray(int length)
all values initially set to 0 |
|
UnsignedByteArray(LLRPBitList list)
create ByteArray from BitList. |
|
UnsignedByteArray(java.lang.String byteString)
create a new UnsignedByteArray from String. |
|
UnsignedByteArray(UnsignedByte[] bytes)
Creates a new UnsignedByteArray object. |
Method Summary | |
---|---|
void |
add(UnsignedByte aByte)
|
void |
decodeBinary(LLRPBitList list)
first 16 bits must be number of Bytes that follow |
void |
decodeXML(org.jdom.Element element)
/** decode from XML |
LLRPBitList |
encodeBinary()
encodes length before encoding containing values |
org.jdom.Content |
encodeXML(java.lang.String name,
org.jdom.Namespace ns)
encode to XML |
UnsignedByte |
get(int i)
get UnsignedByte at specified position |
int |
getByteLength()
number of bytes used to represent this type |
boolean |
inRange(java.lang.String valueString)
expects a string as formated for XML |
static int |
length()
length of BaseType - not of the array - for array length call size() |
void |
set(int i,
UnsignedByte b)
set Byte at provided position to provided byte |
int |
size()
number of elements in array |
java.lang.Integer |
toInteger()
interpred this byte array as a single integer. |
java.lang.String |
toString()
String representation |
java.lang.String |
toString(int radix)
|
Methods inherited from class org.llrp.ltk.types.LLRPType |
---|
toXMLString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected UnsignedByte[] bytes
protected java.lang.Integer value
protected boolean signed
Constructor Detail |
---|
public UnsignedByteArray(UnsignedByte[] bytes)
bytes
- to create UnsignedByteArraypublic UnsignedByteArray(org.jdom.Element element)
element
- to be decodedpublic UnsignedByteArray(int length)
length
- of arraypublic UnsignedByteArray()
public UnsignedByteArray(LLRPBitList list)
list
- to be decodedpublic UnsignedByteArray(byte[] bytes)
bytes
- to create UnsignedByteArraypublic UnsignedByteArray(java.lang.String byteString)
byteString
- Method Detail |
---|
public LLRPBitList encodeBinary()
encodeBinary
in class LLRPType
public int getByteLength()
public static int length()
public void decodeBinary(LLRPBitList list)
decodeBinary
in class LLRPType
list
- to be decodedpublic UnsignedByte get(int i)
i
- position
public void set(int i, UnsignedByte b)
i
- positionb
- byte to be setpublic int size()
public org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
encodeXML
in class LLRPType
name
- of elementns
- Namespacepublic void decodeXML(org.jdom.Element element)
decodeXML
in class LLRPType
element
- to decodepublic void add(UnsignedByte aByte)
public java.lang.Integer toInteger()
public java.lang.String toString(int radix)
toString
in class LLRPType
public java.lang.String toString()
LLRPType
toString
in class LLRPType
public boolean inRange(java.lang.String valueString)
inRange
in class LLRPType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |