Here you can find the source of toByteArray(Long mac)
public static byte[] toByteArray(Long mac)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] toByteArray(Long mac) { byte macArr[] = new byte[] { (byte) ((mac >> 40) & 0xff), (byte) ((mac >> 32) & 0xff), (byte) ((mac >> 24) & 0xff), (byte) ((mac >> 16) & 0xff), (byte) ((mac >> 8) & 0xff), (byte) ((mac >> 0) & 0xff), }; return macArr; }/*from ww w . j a v a 2 s.c om*/ }