public class UnsignedByteArray extends LLRPType
Modifier and Type | Field and Description |
---|---|
protected UnsignedByte[] |
bytes |
protected boolean |
signed |
protected java.lang.Integer |
value |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
toXMLString
protected UnsignedByte[] bytes
protected java.lang.Integer value
protected boolean signed
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
- 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
- positionpublic 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)
public void decodeXML(org.jdom.Element element)
public void add(UnsignedByte aByte)
public java.lang.Integer toInteger()
public java.lang.String toString()
LLRPType
Copyright © 2007 ETH Zurich.