Java Integer to Hex IntToHex(int i, int length)

Here you can find the source of IntToHex(int i, int length)

Description

Int To Hex

License

Open Source License

Declaration

public static String IntToHex(int i, int length) 

Method Source Code

//package com.java2s;

public class Main {
    public static String IntToHex(int i, int length) {
        String temp = Integer.toHexString(i);
        while (temp.length() < length * 2) {
            temp = "0" + temp;
        }//  w w w  .jav  a2  s.c  o m
        return temp;
    }
}

Related

  1. intToFixedLengthHexString(int i, int length)
  2. intToHex(int a)
  3. intToHex(int i)
  4. intToHex(int i)
  5. intToHex(int i)
  6. intToHex(int id)
  7. intToHex(int num)
  8. intToHex(int val)
  9. intToHex(int val, char delim)