Class EthType


  • public class EthType
    extends Object
    Representation of an Ethertype.
    • Constructor Detail

      • EthType

        public EthType​(int etherType)
        Builds the EthType.
        Parameters:
        etherType - an integer representing an ethtype
      • EthType

        public EthType​(short etherType)
        Builds the EthType.
        Parameters:
        etherType - a short representing the ethtype
    • Method Detail

      • toShort

        public short toShort()
        Returns the short value for this ethtype.
        Returns:
        a short value
      • lookup

        public EthType.EtherType lookup​(short etherType)
        Looks up the ethertype by it's numerical representation and returns it's textual format.
        Parameters:
        etherType - the short value of the ethertype
        Returns:
        a textual representation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object