|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.ext.Convert
public class Convert
This routine converts directly between Race, Punycode and Native forms,
abstracting any intermediate steps. For instance, it is possible for calling
applications to convert a domain name from Race to Punycode and UTF8 using a
single call.
Note:
Data conversions involving "Race" and "Punycode" rely on the underlying Idna
object. Encoding to "Race" or "Punycode" always applies the Nameprep
algorithm. Decoding from "Race" or "Punycode" may optionally apply Nameprep
dependant on the toUnicodeRoundTripCheckFlag of the Idna object. Conversions
to and from all other data types do not include the Nameprep algorithm, and
are allowed to contain data not valid for IDN registration.
| Field Summary | |
|---|---|
static java.lang.String |
PUNYCODE_ENCODING
A string refering to the Punycode algorithm referenced in RFC 3492. |
static java.lang.String |
RACE_ENCODING
A string refering to the Row-based ASCII Compatible Encoding. |
| Constructor Summary | |
|---|---|
Convert()
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
Convert(Idna aRace,
Idna aPunycode)
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
Convert(Idna aRace,
Idna aPunycode,
UnicodeFilter aUnicodeFilter)
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
Convert(Punycode aPunycode,
Race aRace)
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
Convert(Punycode aPunycode,
Race aRace,
boolean aToUnicodeExceptionFlag)
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
Convert(Punycode aPunycode,
Race aRace,
boolean aToUnicodeExceptionFlag,
boolean aIsRegistrationProtocol)
Construct a new Convert object to transform a single input sequence into one or more encoding forms. |
|
| Method Summary | |
|---|---|
java.lang.String |
execute(java.lang.String aInput,
java.lang.String aInputType,
java.lang.String aOutputType)
Convert the input sequence into a new encoding form. |
java.util.Properties |
execute(java.lang.String aInput,
java.lang.String aInputType,
java.lang.String[] aOutputTypes)
Convert the input sequence into one or more encoding forms. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RACE_ENCODING
public static final java.lang.String PUNYCODE_ENCODING
| Constructor Detail |
|---|
public Convert()
throws XcodeException
XcodeException
public Convert(Punycode aPunycode,
Race aRace)
throws XcodeException
aPunycode - An Ace object for converting to and from Punycode.aRace - An Ace object for converting to and from Race.
XcodeException - If the parameters are null or invalid.
public Convert(Punycode aPunycode,
Race aRace,
boolean aToUnicodeExceptionFlag)
throws XcodeException
aPunycode - An Ace object for converting to and from Punycode.aRace - An Ace object for converting to and from Race.aToUnicodeExceptionFlag - (see the Idna object for details)
XcodeException - If the parameters are null or invalid.
public Convert(Punycode aPunycode,
Race aRace,
boolean aToUnicodeExceptionFlag,
boolean aIsRegistrationProtocol)
throws XcodeException
aPunycode - An Ace object for converting to and from Punycode.aRace - An Ace object for converting to and from Race.aToUnicodeExceptionFlag - (see the Idna object for details)
XcodeException - If the parameters are null or invalid.
public Convert(Idna aRace,
Idna aPunycode,
UnicodeFilter aUnicodeFilter)
aRace - An Idna object for converting to and from Race.aPunycode - An Idna object for converting to and from Punycode.aUnicodeFilter - A UnicodeFilter object to applied to the input sequence before
encoding.
XcodeException - If the parameters are null or invalid.
public Convert(Idna aRace,
Idna aPunycode)
aRace - An Idna object for converting to and from Race.aPunycode - An Idna object for converting to and from Punycode.
XcodeException - If the parameters are null or invalid.| Method Detail |
|---|
public java.lang.String execute(java.lang.String aInput,
java.lang.String aInputType,
java.lang.String aOutputType)
throws XcodeException
aInput - the string to be convertedaInputType - the encoding type of the input stringaOutputType - the desired output encoding
XcodeException - if either the input string is invalid or the itype/otype is not
supported
public java.util.Properties execute(java.lang.String aInput,
java.lang.String aInputType,
java.lang.String[] aOutputTypes)
throws XcodeException
aInput - the string to be convertedaInputType - the encoding type of the input stringaOutputTypes - the String array of desired output encodings
XcodeException - On invalid input parameters
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||