static public String toHanyuPinyinString(String str,
            HanyuPinyinOutputFormat outputFormat, String seperater)
            throws BadHanyuPinyinOutputFormatCombination
    {

        StringBuffer resultPinyinStrBuf = new StringBuffer();

        for (int i = 0; i < str.length(); i++)
        {
            String mainPinyinStrOfChar = getFirstHanyuPinyinString(str.charAt(i), outputFormat);

            if (null != mainPinyinStrOfChar)
            {
                resultPinyinStrBuf.append(mainPinyinStrOfChar);
                if (i != str.length() - 1)
                { // avoid appending at the end
                    resultPinyinStrBuf.append(seperater);
                }
            } else
            {
                resultPinyinStrBuf.append(str.charAt(i));
            }
        }

        return resultPinyinStrBuf.toString();
    }