public class EthernetAddress extends DataLinkAddress
| Modifier and Type | Field and Description |
|---|---|
static String |
addressName |
static EthernetAddress |
BROADCASTMAC |
static EthernetAddress |
INVALIDHOST |
static int |
SIZE |
| Constructor and Description |
|---|
EthernetAddress(byte[] macAddress)
Public constructor for an Ethernet MAC address starting from
the byte constituing the address, the constructor validate the
size of the arrive to make sure it met the expected size
|
| Modifier and Type | Method and Description |
|---|---|
EthernetAddress |
clone()
Used to copy the DataLinkAddress in a polymorphic way
|
boolean |
equals(Object obj) |
String |
getMacAddress() |
byte[] |
getValue()
Return the Ethernet Mac address in byte array format
|
int |
hashCode() |
String |
toString() |
getNamepublic static final EthernetAddress BROADCASTMAC
public static final EthernetAddress INVALIDHOST
public static final String addressName
public static final int SIZE
public EthernetAddress(byte[] macAddress)
throws ConstructionException
macAddress - A byte array in big endian format
representing the Ethernet MAC AddressConstructionExceptionpublic EthernetAddress clone()
DataLinkAddressclone in class DataLinkAddresspublic byte[] getValue()
public int hashCode()
hashCode in class DataLinkAddresspublic boolean equals(Object obj)
equals in class DataLinkAddresspublic String toString()
toString in class DataLinkAddresspublic String getMacAddress()
Copyright © 2015. All Rights Reserved.