jaulib v1.3.6
Jau Support Library (C++, Java, ..)
|
A 48 bit EUI-48 sub-identifier, see EUI48
.
More...
Public Member Functions | |
EUI48Sub () | |
Construct empty unset instance. | |
EUI48Sub (final String str) throws IllegalArgumentException | |
Construct a sub EUI48 via given string representation. | |
EUI48Sub (final byte stream[], final int pos, final int len_, final ByteOrder byte_order) | |
Copy len_ address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder() . | |
final boolean | equals (final Object obj) |
final int | hashCode () |
void | clearHash () |
Method clears the cached hash value. | |
void | clear () |
Method clears the underlying byte array b and sets length to zero. | |
int | indexOf (final EUI48Sub needle, final ByteOrder byte_order) |
Finds the index of given EUI48Sub needle within this instance haystack in the given byte order. | |
boolean | contains (final EUI48Sub needle) |
Returns true, if given EUI48Sub needle is contained in this instance haystack. | |
final String | toString () |
Static Public Member Functions | |
static boolean | scanEUI48Sub (final String str, final EUI48Sub dest, final StringBuilder errmsg) |
Fills given EUI48Sub instance via given string representation. | |
static int | indexOf (final byte haystack_b[], final int haystack_length, final byte needle_b[], final int needle_length, final ByteOrder byte_order) |
Find index of needle within haystack in the given byte order. | |
Public Attributes | |
final byte | b [] |
The EUI48 sub-address, always 6 bytes reserved. | |
int | length |
The actual length in bytes of the EUI48 sub-address, less or equal 6 bytes. | |
Static Public Attributes | |
static final EUI48Sub | ANY_DEVICE = new EUI48Sub( new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }, 0, 6, ByteOrder.LITTLE_ENDIAN ) |
EUI48Sub MAC address matching any device, i.e. | |
static final EUI48Sub | ALL_DEVICE = new EUI48Sub( new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }, 0, 6, ByteOrder.LITTLE_ENDIAN ) |
EUI48Sub MAC address matching all device, i.e. | |
static final EUI48Sub | LOCAL_DEVICE = new EUI48Sub( new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0xff }, 0, 6, ByteOrder.LITTLE_ENDIAN ) |
EUI48Sub MAC address matching local device, i.e. | |
A 48 bit EUI-48 sub-identifier, see EUI48
.
Stores value in ByteOrder#nativeOrder()
byte order.
Definition at line 37 of file EUI48Sub.java.
org.jau.net.EUI48Sub.EUI48Sub | ( | ) |
Construct empty unset instance.
Definition at line 116 of file EUI48Sub.java.
org.jau.net.EUI48Sub.EUI48Sub | ( | final String | str | ) | throws IllegalArgumentException |
Construct a sub EUI48 via given string representation.
Implementation is consistent with toString()
.
str | a string of less or equal of 17 characters representing less or equal of 6 bytes as hexadecimal numbers separated via colon, e.g. "01:02:03:0A:0B:0C" , "01:02:03:0A" , ":" , "" . |
IllegalArgumentException | if given string doesn't comply with EUI48 |
Definition at line 131 of file EUI48Sub.java.
org.jau.net.EUI48Sub.EUI48Sub | ( | final byte | stream[], |
final int | pos, | ||
final int | len_, | ||
final ByteOrder | byte_order ) |
Copy len_ address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder()
.
stream | address bytes |
pos | position in stream at address |
len_ | number of address bytes |
byte_order | ByteOrder#LITTLE_ENDIAN or ByteOrder#BIG_ENDIAN byte order of given address bytes, one may pass ByteOrder#nativeOrder() . |
Definition at line 148 of file EUI48Sub.java.
void org.jau.net.EUI48Sub.clear | ( | ) |
Method clears the underlying byte array b
and sets length to zero.
The cached hash value is also cleared.
Definition at line 208 of file EUI48Sub.java.
void org.jau.net.EUI48Sub.clearHash | ( | ) |
boolean org.jau.net.EUI48Sub.contains | ( | final EUI48Sub | needle | ) |
Returns true, if given EUI48Sub needle is contained in this instance haystack.
If the sub is zero, true is returned.
Definition at line 289 of file EUI48Sub.java.
final boolean org.jau.net.EUI48Sub.equals | ( | final Object | obj | ) |
final int org.jau.net.EUI48Sub.hashCode | ( | ) |
Implementation uses a lock-free volatile cache.
Definition at line 185 of file EUI48Sub.java.
|
static |
Find index of needle within haystack in the given byte order.
The returned index will be adjusted for the desired byte order.
ByteOrder#BIG_ENDIAN
will return index 0 for the leading byte like the toString()
representation from left (MSB) to right (LSB).ByteOrder#LITTLE_ENDIAN
will return index 5 for the leading bytehaystack_b | haystack data |
haystack_length | haystack length |
needle_b | needle data |
needle_length | needle length |
byte_order | byte order will adjust the returned index, ByteOrder#BIG_ENDIAN is equivalent with toString() representation from left (MSB) to right (LSB). |
Definition at line 229 of file EUI48Sub.java.
int org.jau.net.EUI48Sub.indexOf | ( | final EUI48Sub | needle, |
final ByteOrder | byte_order ) |
Finds the index of given EUI48Sub needle within this instance haystack in the given byte order.
The returned index will be adjusted for the desired byte order.
ByteOrder#BIG_ENDIAN
will return index 0 for the leading byte like the toString()
representation from left (MSB) to right (LSB).ByteOrder#LITTLE_ENDIAN
will return index 5 for the leading byteneedle | |
byte_order | byte order will adjust the returned index, ByteOrder#BIG_ENDIAN is equivalent with toString() representation from left (MSB) to right (LSB). |
Definition at line 279 of file EUI48Sub.java.
|
static |
Fills given EUI48Sub instance via given string representation.
Implementation is consistent with toString()
.
str | a string of less or equal of 17 characters representing less or equal of 6 bytes as hexadecimal numbers separated via colon, e.g. "01:02:03:0A:0B:0C" , "01:02:03:0A" , ":" , "" . |
dest | EUI48Sub to set its value |
errmsg | error parsing message if returning false |
Definition at line 70 of file EUI48Sub.java.
final String org.jau.net.EUI48Sub.toString | ( | ) |
Returns the EUI48 sub-string representation, less or equal 17 characters representing less or equal 6 bytes as upper case hexadecimal numbers separated via colon, e.g. "01:02:03:0A:0B:0C"
, "01:02:03:0A"
, ":"
, ""
.
Definition at line 302 of file EUI48Sub.java.
|
static |
EUI48Sub MAC address matching all device, i.e.
'ff:ff:ff:ff:ff:ff'.
Definition at line 41 of file EUI48Sub.java.
|
static |
EUI48Sub MAC address matching any device, i.e.
'0:0:0:0:0:0'.
Definition at line 39 of file EUI48Sub.java.
final byte org.jau.net.EUI48Sub.b[] |
The EUI48 sub-address, always 6 bytes reserved.
Definition at line 48 of file EUI48Sub.java.
int org.jau.net.EUI48Sub.length |
The actual length in bytes of the EUI48 sub-address, less or equal 6 bytes.
Definition at line 55 of file EUI48Sub.java.
|
static |
EUI48Sub MAC address matching local device, i.e.
'0:0:0:ff:ff:ff'.
Definition at line 43 of file EUI48Sub.java.