Java Hex Format formatAsHexUppercase(long msgId)

Here you can find the source of formatAsHexUppercase(long msgId)

Description

format As Hex Uppercase

License

Apache License

Declaration

public static String formatAsHexUppercase(long msgId) 

Method Source Code

//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 :)
    }
}

Related

  1. formatAddress6(int[] hexRepresentation)
  2. FormatAs2CharHexa(byte byValue)
  3. FormatAs4CharHexa(int nValue)
  4. formatAsHex(byte[] bytes)
  5. formatAsHex(long msgId)
  6. formatAsRawHex(int bitStringLength, String hex)
  7. formatBytes2HexString(byte[] bytes, int offset, int length)
  8. formatByteToPaddedHex(int i, int l)
  9. formatColorInt2HexString(int c)