Here you can find the source of toHex16(long l)
public static final String toHex16(long l)
//package com.java2s; public class Main { /** @see #toHex2(int) */ private static boolean hexUpperCase = true; public static final String toHex16(long l) { String s = "000000000000000" + Long.toHexString(l); s = s.substring(s.length() - 16); return hexUpperCase ? s.toUpperCase() : s; }//from ww w . java 2s . c om }