code: private static String hexFormat(int trgt) {
      String s = Integer.toHexString(trgt);
      int sz = s.length();
  
      if (sz == 8) {
        return s;
      }
      int fill = 8 - sz;
      StringBuilder buf = new StringBuilder();
  
      for (int i = 0; i < fill; ++i) {
        // add leading zeros
        buf.append('0');
      }
      buf.append(s);
      return buf.toString();
    }
docs: Returns an 8 character hexidecimal representation of trgt. If the result is not equal to eight characters leading
  zeros are prefixed.
  
  @return 8 character hex representation of trgt