Here you can find the source of formatAsHexUppercase(long msgId)
public static String formatAsHexUppercase(long msgId)
//package com.java2s; //License from project: Apache License public class Main { public static String formatAsHexUppercase(long msgId) { return formatAsHex(msgId).toUpperCase(); }//from w w w . j a v a2 s.c om public static String formatAsHex(long msgId) { String msgIdStr = String.format("%07x", msgId); return msgIdStr.toLowerCase(); // just to be sure :) } }