code: public static String toHexString( int val, int size ) {
          char[] c = new char[size];
          toHexChars( val, c, 0, size );
          return new String( c );
      }
docs: This is an alternative to the <code>java.lang.Integer.toHexString</cod>
  method. It is an efficient relative that also will pad the left side so
  that the result is <code>size</code> digits.