code: public static byte[] parseMAC(String value) {
          final byte[] machineId;
          final char separator;
          switch (value.length()) {
              case 17:
                  separator = value.charAt(2);
                  validateMacSeparator(separator);
                  machineId = new byte[EUI48_MAC_ADDRESS_LENGTH];
                  break;
              case 23:
                  separator = value.charAt(2);
                  validateMacSeparator(separator);
                  machineId = new byte[EUI64_MAC_ADDRESS_LENGTH];
                  break;
              default:
                  throw new IllegalArgumentException("value is not supported [MAC-48, EUI-48, EUI-64]");
          }
  
          final int end = machineId.length - 1;
          int j = 0;
          for (int i = 0; i < end; ++i, j += 3) {
              final int sIndex = j + 2;
              machineId[i] = StringUtil.decodeHexByte(value, j);
              if (value.charAt(sIndex) != separator) {
                  throw new IllegalArgumentException("expected separator '" + separator + " but got '" +
                          value.charAt(sIndex) + "' at index: " + sIndex);
              }
          }
  
          machineId[end] = StringUtil.decodeHexByte(value, j);
  
          return machineId;
      }
docs: Parse a EUI-48, MAC-48, or EUI-64 MAC address from a {@link String} and return it as a {@code byte[]}.
  @param value The string representation of the MAC address.
  @return The byte representation of the MAC address.