/**
   * <br>
   * Created on: 2013-8-21 上午10:59:29
   */
  private static void getMacAddress() {
    BufferedReader br = null;
    Process process = null;
    Pattern macPattern = null;
    Matcher macMatcher = null;

    try {

      if (Env.getPlatform() == Env.getOsWindows())
        process = Runtime.getRuntime().exec("cmd /c ipconfig /all");
      else if (Env.getPlatform() == Env.getOsUnix())
        process = Runtime.getRuntime().exec("ifconfig");

      br = new BufferedReader(new InputStreamReader(process.getInputStream()));

      String line = null;

      macPattern = Pattern.compile("([0-9A-Fa-f]{2})(-[0-9A-Fa-f]{2}){5}");
      boolean result = false;

      while ((line = br.readLine()) != null) {
        if (DataTools.isEmpty(line)) continue;
        macMatcher = macPattern.matcher(line);
        result = macMatcher.find();
        if (result) list.add(macMatcher.group(0));
      }
      br.close();
      br = null;
      macMatcher = null;
      macPattern = null;
    } catch (IOException e) {
    } finally {
      try {
        if (!DataTools.isEmpty(br)) {
          br.close();
          br = null;
        }
        macMatcher = null;
        macPattern = null;
      } catch (IOException e) {
      } finally {
        br = null;
        macMatcher = null;
        macPattern = null;
      }
    }
  }