Class IDNAConverter
java.lang.Object
com.centralnicreseller.apiconnector.IDNAConverter
Utility class for processing domain names using the IDNA protocol.
IDNAConverter.java.
- Since:
- 5.0
- Version:
- %I%, %G%
- Author:
- Asif Nawaz
-
Constructor Summary
ConstructorDescriptionIDNAConverter
(String idn, String pc) Constructs an IDNAConverter with a single domain name's Unicode and ASCII representations.IDNAConverter
(List<String> idnList, List<String> pcList) Constructs an IDNAConverter with lists of domain names' Unicode and ASCII representations. -
Method Summary
Modifier and TypeMethodDescriptionstatic IDNAConverter
Converts a single domain name to its Unicode and ASCII representations.static IDNAConverter
Converts a single domain name to its Unicode and ASCII representations, specifying whether to use transitional processing.static IDNAConverter
Converts a list of domain names to their Unicode and ASCII representations.static IDNAConverter
Converts a list of domain names to their Unicode and ASCII representations, specifying whether to use transitional processing.getIdn()
Returns the Unicode representation of the domain name.Returns the list of Unicode representations of the domain names.getPc()
Returns the ASCII (Punycode) representation of the domain name.Returns the list of ASCII (Punycode) representations of the domain names.
-
Constructor Details
-
IDNAConverter
-
IDNAConverter
Constructs an IDNAConverter with lists of domain names' Unicode and ASCII representations.- Parameters:
idnList
- The list of Unicode representations of the domain names.pcList
- The list of ASCII (Punycode) representations of the domain names.
-
-
Method Details
-
convert
Converts a single domain name to its Unicode and ASCII representations.- Parameters:
domainName
- The domain name to convert.- Returns:
- An IDNAConverter containing both the Unicode and ASCII representations.
-
convert
Converts a single domain name to its Unicode and ASCII representations, specifying whether to use transitional processing.- Parameters:
domainName
- The domain name to convert.useTransitional
- Whether to use transitional processing.- Returns:
- An IDNAConverter containing both the Unicode and ASCII representations.
-
convert
Converts a list of domain names to their Unicode and ASCII representations.- Parameters:
domainNames
- The list of domain names to convert.- Returns:
- An IDNAConverter containing lists of both the Unicode and ASCII representations.
-
convert
Converts a list of domain names to their Unicode and ASCII representations, specifying whether to use transitional processing.- Parameters:
domainNames
- The list of domain names to convert.useTransitional
- Whether to use transitional processing.- Returns:
- An IDNAConverter containing lists of both the Unicode and ASCII representations.
-
getIdn
Returns the Unicode representation of the domain name.- Returns:
- The Unicode representation.
-
getPc
Returns the ASCII (Punycode) representation of the domain name.- Returns:
- The ASCII representation.
-
getIdnList
-
getPcList
-