JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
io.netty.util.internal

Class MacAddressUtil



  • public final class MacAddressUtil
    extends Object 
    • Method Detail

      • bestAvailableMac

        public static byte[] bestAvailableMac()
        Obtains the best MAC address found on local network interfaces. Generally speaking, an active network interface used on public networks is better than a local network interface.
        Returns:
        byte array containing a MAC. null if no MAC can be found.
      • defaultMachineId

        public static byte[] defaultMachineId()
        Returns the result of bestAvailableMac() if non-null otherwise returns a random EUI-64 MAC address.
      • parseMAC

        public static byte[] parseMAC(String value)
        Parse a EUI-48, MAC-48, or EUI-64 MAC address from a String and return it as a byte[].
        Parameters:
        value - The string representation of the MAC address.
        Returns:
        The byte representation of the MAC address.
      • formatAddress

        public static String formatAddress(byte[] addr)
        Parameters:
        addr - byte array of a MAC address.
        Returns:
        hex formatted MAC address.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 2008–2025 The Netty Project. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /