|
jaulib v1.4.1
Jau Support Library (C++, Java, ..)
|
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address). More...
Public Member Functions | |
| EUI48 (final String str) throws IllegalArgumentException | |
| Construct instance via given string representation. | |
| EUI48 (final byte stream[], final int pos, final ByteOrder byte_order) | |
Copy address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder(). | |
| EUI48 (final byte address[], final ByteOrder byte_order) | |
Copy address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder(). | |
| EUI48 () | |
| Construct empty unset instance. | |
| 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 cached hash value. | |
| final void | put (final byte[] sink, final int sink_pos, final ByteOrder byte_order) |
| Method transfers all bytes representing this instance into the given destination array at the given position and in the given byte order. | |
| 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 is contained in here. | |
| final String | toString () |
Static Public Member Functions | |
| static boolean | scanEUI48 (final String str, final EUI48 dest, final StringBuilder errmsg) |
| Fills given EUI48 instance via given string representation. | |
Public Attributes | |
| final byte | b [] |
| The 6 byte EUI48 address. | |
Static Public Attributes | |
| static final EUI48 | ANY_DEVICE = new EUI48( new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }, ByteOrder.LITTLE_ENDIAN ) |
| EUI48 MAC address matching any device, i.e. | |
| static final EUI48 | ALL_DEVICE = new EUI48( new byte[] { (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff }, ByteOrder.LITTLE_ENDIAN ) |
| EUI48 MAC address matching all device, i.e. | |
| static final EUI48 | LOCAL_DEVICE = new EUI48( new byte[] { (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0xff }, ByteOrder.LITTLE_ENDIAN ) |
| EUI48 MAC address matching local device, i.e. | |
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address).
Stores value in ByteOrder#nativeOrder() byte order.
Implementation caches the hash value hashCode(), hence users shall take special care when mutating the underlying data b, read its API notes.
Definition at line 42 of file EUI48.java.
| org.jau.net.EUI48.EUI48 | ( | final String | str | ) | throws IllegalArgumentException |
Construct instance via given string representation.
Implementation is consistent with toString().
| str | a string of exactly 17 characters representing 6 bytes as hexadecimal numbers separated via colon "01:02:03:0A:0B:0C". |
| IllegalArgumentException | if given string doesn't comply with EUI48 |
Definition at line 111 of file EUI48.java.
| org.jau.net.EUI48.EUI48 | ( | final byte | stream[], |
| final int | pos, | ||
| final ByteOrder | byte_order ) |
Copy address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder().
| stream | address bytes |
| pos | position in stream at address |
| byte_order | ByteOrder#LITTLE_ENDIAN or ByteOrder#BIG_ENDIAN byte order of given address bytes, one may pass ByteOrder#nativeOrder(). |
Definition at line 127 of file EUI48.java.
| org.jau.net.EUI48.EUI48 | ( | final byte | address[], |
| final ByteOrder | byte_order ) |
Copy address bytes from given source and byte order, while converting them to ByteOrder#nativeOrder().
| address | 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 146 of file EUI48.java.
| org.jau.net.EUI48.EUI48 | ( | ) |
Construct empty unset instance.
Definition at line 151 of file EUI48.java.
| void org.jau.net.EUI48.clear | ( | ) |
Method clears the underlying byte array b and cached hash value.
Definition at line 215 of file EUI48.java.
| void org.jau.net.EUI48.clearHash | ( | ) |
| boolean org.jau.net.EUI48.contains | ( | final EUI48Sub | needle | ) |
Returns true, if given EUI48Sub is contained in here.
If the sub is zero, true is returned.
Definition at line 266 of file EUI48.java.
| final boolean org.jau.net.EUI48.equals | ( | final Object | obj | ) |
| final int org.jau.net.EUI48.hashCode | ( | ) |
Implementation uses a lock-free volatile cache.
Definition at line 180 of file EUI48.java.
| int org.jau.net.EUI48.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 byte| needle | |
| 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 256 of file EUI48.java.
| final void org.jau.net.EUI48.put | ( | final byte[] | sink, |
| final int | sink_pos, | ||
| final ByteOrder | byte_order ) |
Method transfers all bytes representing this instance into the given destination array at the given position and in the given byte order.
Implementation is consistent with EUI48(byte[], int, ByteOrder).
| sink | the destination array |
| sink_pos | starting position in the destination array |
| byte_order | destination buffer byte order |
| IllegalArgumentException |
Definition at line 233 of file EUI48.java.
|
static |
Fills given EUI48 instance via given string representation.
Implementation is consistent with toString().
| str | a string of exactly 17 characters representing 6 bytes as hexadecimal numbers separated via colon "01:02:03:0A:0B:0C". |
| dest | EUI48 to set its value |
| errmsg | error parsing message if returning false |
Definition at line 79 of file EUI48.java.
| final String org.jau.net.EUI48.toString | ( | ) |
Returns the EUI48 string representation, exactly 17 characters representing 6 bytes as upper case hexadecimal numbers separated via colon "01:02:03:0A:0B:0C".
Definition at line 279 of file EUI48.java.
|
static |
EUI48 MAC address matching all device, i.e.
'ff:ff:ff:ff:ff:ff'.
Definition at line 46 of file EUI48.java.
|
static |
EUI48 MAC address matching any device, i.e.
'0:0:0:0:0:0'.
Definition at line 44 of file EUI48.java.
| final byte org.jau.net.EUI48.b[] |
The 6 byte EUI48 address.
If modifying, it is the user's responsibility to avoid data races.
Further, call clearHash() after mutation is complete.
Definition at line 57 of file EUI48.java.
|
static |
EUI48 MAC address matching local device, i.e.
'0:0:0:ff:ff:ff'.
Definition at line 48 of file EUI48.java.