Class UTS46


  • public final class UTS46
    extends IDNA
    UTS #46 (IDNA2008) implementation.
    Since:
    2010jul09
    • Constructor Detail

      • UTS46

        public UTS46​(int options)
    • Method Detail

      • labelToASCII

        public StringBuilder labelToASCII​(CharSequence label,
                                          StringBuilder dest,
                                          IDNA.Info info)
        Description copied from class: IDNA
        Converts a single domain name label into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The label might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.
        Specified by:
        labelToASCII in class IDNA
        Parameters:
        label - Input domain name label
        dest - Destination string object
        info - Output container of IDNA processing details.
        Returns:
        dest
      • labelToUnicode

        public StringBuilder labelToUnicode​(CharSequence label,
                                            StringBuilder dest,
                                            IDNA.Info info)
        Description copied from class: IDNA
        Converts a single domain name label into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The label might be modified according to the types of errors.
        Specified by:
        labelToUnicode in class IDNA
        Parameters:
        label - Input domain name label
        dest - Destination string object
        info - Output container of IDNA processing details.
        Returns:
        dest
      • nameToASCII

        public StringBuilder nameToASCII​(CharSequence name,
                                         StringBuilder dest,
                                         IDNA.Info info)
        Description copied from class: IDNA
        Converts a whole domain name into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The domain name might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.
        Specified by:
        nameToASCII in class IDNA
        Parameters:
        name - Input domain name
        dest - Destination string object
        info - Output container of IDNA processing details.
        Returns:
        dest
      • nameToUnicode

        public StringBuilder nameToUnicode​(CharSequence name,
                                           StringBuilder dest,
                                           IDNA.Info info)
        Description copied from class: IDNA
        Converts a whole domain name into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The domain name might be modified according to the types of errors.
        Specified by:
        nameToUnicode in class IDNA
        Parameters:
        name - Input domain name
        dest - Destination string object
        info - Output container of IDNA processing details.
        Returns:
        dest