code: public static boolean isHexidecimal(String str) {
        if (str == null) {
            return false;
        }
        return Pattern.compile("[0-9a-fA-F]*").matcher(str).matches();
    }
docs: <p>Checks if the String contains only hexidecimal digits.
  A decimal point is not a hexidecimal digit and returns false.</p>
  
  <p><code>null</code> will return <code>false</code>.
  An empty String ("") will return <code>true</code>.</p>
  
  <pre>
  GosuStringUtil.isHexidecimal(null)   = false
  GosuStringUtil.isHexidecimal("")     = true
  GosuStringUtil.isHexidecimal("  ")   = false
  GosuStringUtil.isHexidecimal("123")  = true
  GosuStringUtil.isHexidecimal("12 3") = false
  GosuStringUtil.isHexidecimal("ab2c") = true
  GosuStringUtil.isHexidecimal("ah2c") = false
  GosuStringUtil.isHexidecimal("12-3") = false
  GosuStringUtil.isHexidecimal("12.3") = false
  </pre>
  
  @param str  the String to check, may be null
  @return <code>true</code> if only contains hexidecimal digits, and is non-null