java.lang.Object
org.minidns.idna.MiniDnsIdna
Utility class for Internationalized Domain Names in Applications (IDNA) processing.
Provides methods to convert between Unicode and ASCII representations of domain names according to IDNA specifications.
Provides methods to convert between Unicode and ASCII representations of domain names according to IDNA specifications.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static IdnaTransformatorThe active IDNA transformator implementationConstructor Summary
ConstructorsConstructorDescriptionThe transformator is a single static instance shared by every caller, so an object here carries no per-instance state.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic voidsetActiveTransformator(IdnaTransformator idnaTransformator) Sets the active IDNA transformator implementation.static StringConverts a Unicode string to its ASCII representation using IDNA.static StringConverts an ASCII string back to its Unicode representation using IDNA.
Field Details
idnaTransformator
The active IDNA transformator implementation
Constructor Details
MiniDnsIdna
public MiniDnsIdna()The transformator is a single static instance shared by every caller, so an object here carries no per-instance state.
Method Details
toASCII
toUnicode
setActiveTransformator
Sets the active IDNA transformator implementation.- Parameters:
idnaTransformator- the transformator to use, must not be null- Throws:
IllegalArgumentException- if idnaTransformator is null