Here you can find the source of longToHexString(long number)
public static String longToHexString(long number) throws NumberFormatException
//package com.java2s; //License from project: Apache License public class Main { /**//from w ww . j av a 2s. c om * Convert a long to a hex String. */ public static String longToHexString(long number) throws NumberFormatException { return Long.toString(number, 16); } }