public static String convertToHexString(String decimalString, String delimiter)
    {
        StringBuilder buf = null;

        if (decimalString != null)
        {
            String[] numbers = delimiter != null && delimiter.trim().length() > 0 ? decimalString.split(delimiter)
                            : new String[] { decimalString };

            if (numbers != null && numbers.length > 0)
            {
                buf = new StringBuilder(17);

                int i = 0;
                for (String number : numbers)
                {
                    try
                    {
                        int iNumber = Integer.parseInt(number);

                        buf.append(String.format("%02X", iNumber));

                        if (i < numbers.length - 1)
                        {
                            buf.append(MAC_ADDRESS_DELIMITER);
                        }
                    }

                    catch (NumberFormatException ignored)
                    {
                        return null;
                    }

                    i++;
                }
            }
        }

        return buf != null ? buf.toString() : null;
    }