public class ConfHexList extends ConfBinary implements Cloneable, Serializable
tailf:hex-list
type.
A list of colon-separated hexa-decimal octets e.g. '4F:4C:41:71'.
A hex-list is defined as:
typedef hex-list { type string { pattern '(([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*)?'; } }
When a instance of this type is encoded and send over the
socket through MAAPI or CDB with the
Maapi.setElem(int,com.tailf.conf.ConfObject,
com.tailf.conf.ConfPath)
,
CdbSession.setElem(com.tailf.conf.ConfValue,
com.tailf.conf.ConfPath)
method
it will encode this value as a ConfBinary
which has the
effect that the corresponding getElem
from MAAPI and CDB
will return a ConfBinary
instead of a ConfHexList
.
ConfBinary
,
Serialized FormJ_BINARY, J_BIT32, J_BIT64, J_BITBIG, J_BOOL, J_BUF, J_CDBBEGIN, J_DATE, J_DATETIME, J_DECIMAL64, J_DEFAULT, J_DOUBLE, J_DQUAD, J_DURATION, J_ENUMERATION, J_HEXSTR, J_IDENTITYREF, J_INSTANCE_IDENTIFIER, J_INT16, J_INT32, J_INT64, J_INT8, J_IPV4, J_IPV4_AND_PLEN, J_IPV4PREFIX, J_IPV6, J_IPV6_AND_PLEN, J_IPV6PREFIX, J_LIST, J_NOEXISTS, J_OBJECTREF, J_OID, J_PTR, J_QNAME, J_STR, J_SYMBOL, J_TIME, J_UINT16, J_UINT32, J_UINT64, J_UINT8, J_UNION, J_XMLBEGIN, J_XMLBEGINDEL, J_XMLEND, J_XMLMOVEAFTER, J_XMLMOVEFIRST, J_XMLTAG
Constructor and Description |
---|
ConfHexList(byte[] val)
Construct a
ConfHexList from a byte array. |
ConfHexList(ConfBinary obj)
Constructs a
ConfHexList from a ConfBinary
object. |
ConfHexList(String str)
Construct a
ConfHexList from a string of bytes in the
format of hexadecimal values separated with colons. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Determine if two ConfValue are equal.
|
int |
hashCode()
Returns a hash code value for the object.
|
String |
toString()
Returns string representation of a
ConfHexList . |
bytesValue, compareTo, encode, setCSType, toHexListString, toOctetListString
getStringByValue, getStringByValue, getValueByString, getValueByString
clone, decode
public ConfHexList(String str) throws ConfException
ConfHexList
from a string of bytes in the
format of hexadecimal values separated with colons.str
- string representation of the ConfHexList
ConfException
public ConfHexList(byte[] val)
ConfHexList
from a byte array.val
- byte array representation of the ConfHexList
public ConfHexList(ConfBinary obj)
ConfHexList
from a ConfBinary
object.obj
- a ConfBinary
objectpublic String toString()
ConfHexList
.
Format a hexList as hexadecimal values separated with colons, as for example: "00:4f:4c:41:ff".
toString
in class ConfBinary
ConfHexList
public boolean equals(Object o)
ConfValue
equals
in class ConfBinary
o
- The object to compare to.public int hashCode()
java.util.Hashtable
.
The hash code is calculated through the list of bytes that this
ConfHexList
holds.hashCode
in class ConfBinary