Java Long to Hex longToHex(long l, int length)

Here you can find the source of longToHex(long l, int length)

Description

long To Hex

License

Open Source License

Declaration

public static String longToHex(long l, int length) 

Method Source Code

//package com.java2s;

public class Main {
    public static String longToHex(long l, int length) {
        String temp = Long.toHexString(l);
        while (temp.length() < length * 2) {
            temp = "0" + temp;
        }//from  w w w. jav a 2 s .  c  o m
        return temp;
    }
}

Related

  1. Long2HexString(long h)
  2. long2hexString(long x)
  3. long2HexString(StringBuilder buf, long value)
  4. longToHex(long a)
  5. longToHex(long l)
  6. longToHex(long num)
  7. longToHex(long val, char delim)
  8. longToHexBytes(final long v)
  9. longToHexBytes(long i)