title: Convert from Long to hex
body: <p>I want to change to value of the major and minor of my beacon by calling a shell script from a java code.
  If for example I want to set the value of the Major to <code>39321</code>, I have to pass a string with the value <code>99 99</code> as parameter to the shell code.
  If I want to set it to <code>34866</code>, I have to pass the hex code <code>88 32</code>.
  How can I convert from a long number like the 39321 to this two character composed hex number like <code>99 99</code>?</p>