@NotThreadSafe public final class PunycodeAutoDecoder extends Object
decode(String)
whether the input was encoded or not.
The recode(String)
method will return
the same format as the original input was.
This object has a state.Constructor and Description |
---|
PunycodeAutoDecoder() |
Modifier and Type | Method and Description |
---|---|
String |
decode(String domain)
Decodes a domain name into UTF-8 if it is in Punycode ASCII.
|
boolean |
isConverted()
Whether the original format was Punnycode ASCII.
|
String |
recode(String domain)
Returns the UTF-8 domain name in the original format.
|
public String decode(String domain)
decoded
. recode(String)
can return the string
in the saved format.domain
- the domain name, may be nullpublic String recode(String domain)
decode(String)
.domain
- the UTF-8 domain name, not nullpublic boolean isConverted()
decode(String)
.true
if the original format was Punnycode ASCIICopyright © 2016. All rights reserved.