class Rfc3492Idn implements Idn {

    public String toUnicode(String punycode) {
        StringBuilder unicode = new StringBuilder(punycode.length());
        StringTokenizer tok = new StringTokenizer(punycode, ".");
        while (tok.hasMoreTokens()) {
            String t = tok.nextToken();
            if (unicode.length() > 0) unicode.append('.');
            if (t.startsWith(ACE_PREFIX)) t = decode(t.substring(4));
            unicode.append(t);
        }
        return unicode.toString();
    }

}