Tabnine Logo
NativeIDN
Code IndexAdd Tabnine to your IDE (free)

How to use
NativeIDN
in
libcore.icu

Best Java code snippets using libcore.icu.NativeIDN (Showing top 20 results out of 315)

origin: robovm/robovm

public static String toUnicode(String s, int flags) {
  try {
    return convert(s, flags, false);
  } catch (IllegalArgumentException ex) {
    // The RI documentation explicitly states that this method can't fail.
    // ICU4C disagrees, as does the RI in practice.
    // The RI just returns the input string if it can't
    return s;
  }
}
origin: robovm/robovm

private static String convert(String s, int flags, boolean toAscii) {
  if (s == null) {
    throw new NullPointerException("s == null");
  }
  return convertImpl(s, flags, toAscii);
}
private static native String convertImpl(String s, int flags, boolean toAscii);
origin: robovm/robovm

/**
 * Transform a Unicode String to ASCII Compatible Encoding String according
 * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
 *
 * <p>If the transformation fails (because the input is not a valid IDN), an
 * exception will be thrown.
 *
 * <p>This method can handle either an individual label or an entire domain name.
 * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
 * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
 * All of these will become U+002E (full stop) in the result.
 *
 * @param input the Unicode name
 * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
 *         or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
 * @return the ACE name
 * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>
 */
public static String toASCII(String input, int flags) {
  return NativeIDN.toASCII(input, flags);
}
origin: robovm/robovm

  /**
   * Equivalent to {@code toUnicode(input, 0)}.
   *
   * @param input the ACE name
   * @return the Unicode name
   */
  public static String toUnicode(String input) {
    return NativeIDN.toUnicode(input, 0);
  }
}
origin: robovm/robovm

/**
 * Translates a string from ASCII Compatible Encoding (ACE) to Unicode
 * according to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
 *
 * <p>Unlike {@code toASCII}, this transformation cannot fail.
 *
 * <p>This method can handle either an individual label or an entire domain name.
 * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
 * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
 *
 * @param input the ACE name
 * @return the Unicode name
 * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
 *         or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
 */
public static String toUnicode(String input, int flags) {
  return NativeIDN.toUnicode(input, flags);
}
origin: robovm/robovm

public static String toASCII(String s, int flags) {
  return convert(s, flags, true);
}
origin: MobiVM/robovm

  /**
   * Equivalent to {@code toUnicode(input, 0)}.
   *
   * @param input the ACE name
   * @return the Unicode name
   */
  public static String toUnicode(String input) {
    return NativeIDN.toUnicode(input, 0);
  }
}
origin: ibinti/bugvm

private static String convert(String s, int flags, boolean toAscii) {
  if (s == null) {
    throw new NullPointerException("s == null");
  }
  return convertImpl(s, flags, toAscii);
}
private static native String convertImpl(String s, int flags, boolean toAscii);
origin: MobiVM/robovm

/**
 * Transform a Unicode String to ASCII Compatible Encoding String according
 * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
 *
 * <p>If the transformation fails (because the input is not a valid IDN), an
 * exception will be thrown.
 *
 * <p>This method can handle either an individual label or an entire domain name.
 * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
 * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
 * All of these will become U+002E (full stop) in the result.
 *
 * @param input the Unicode name
 * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
 *         or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
 * @return the ACE name
 * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>
 */
public static String toASCII(String input, int flags) {
  return NativeIDN.toASCII(input, flags);
}
origin: MobiVM/robovm

public static String toUnicode(String s, int flags) {
  try {
    return convert(s, flags, false);
  } catch (IllegalArgumentException ex) {
    // The RI documentation explicitly states that this method can't fail.
    // ICU4C disagrees, as does the RI in practice.
    // The RI just returns the input string if it can't
    return s;
  }
}
origin: ibinti/bugvm

  /**
   * Equivalent to {@code toUnicode(input, 0)}.
   *
   * @param input the ACE name
   * @return the Unicode name
   */
  public static String toUnicode(String input) {
    return NativeIDN.toUnicode(input, 0);
  }
}
origin: com.mobidevelop.robovm/robovm-rt

private static String convert(String s, int flags, boolean toAscii) {
  if (s == null) {
    throw new NullPointerException("s == null");
  }
  return convertImpl(s, flags, toAscii);
}
private static native String convertImpl(String s, int flags, boolean toAscii);
origin: ibinti/bugvm

/**
 * Transform a Unicode String to ASCII Compatible Encoding String according
 * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
 *
 * <p>If the transformation fails (because the input is not a valid IDN), an
 * exception will be thrown.
 *
 * <p>This method can handle either an individual label or an entire domain name.
 * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
 * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
 * All of these will become U+002E (full stop) in the result.
 *
 * @param input the Unicode name
 * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
 *         or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
 * @return the ACE name
 * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>
 */
public static String toASCII(String input, int flags) {
  return NativeIDN.toASCII(input, flags);
}
origin: ibinti/bugvm

public static String toUnicode(String s, int flags) {
  try {
    return convert(s, flags, false);
  } catch (IllegalArgumentException ex) {
    // The RI documentation explicitly states that this method can't fail.
    // ICU4C disagrees, as does the RI in practice.
    // The RI just returns the input string if it can't
    return s;
  }
}
origin: com.bugvm/bugvm-rt

  /**
   * Equivalent to {@code toUnicode(input, 0)}.
   *
   * @param input the ACE name
   * @return the Unicode name
   */
  public static String toUnicode(String input) {
    return NativeIDN.toUnicode(input, 0);
  }
}
origin: MobiVM/robovm

private static String convert(String s, int flags, boolean toAscii) {
  if (s == null) {
    throw new NullPointerException("s == null");
  }
  return convertImpl(s, flags, toAscii);
}
private static native String convertImpl(String s, int flags, boolean toAscii);
origin: com.gluonhq/robovm-rt

/**
 * Transform a Unicode String to ASCII Compatible Encoding String according
 * to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
 *
 * <p>If the transformation fails (because the input is not a valid IDN), an
 * exception will be thrown.
 *
 * <p>This method can handle either an individual label or an entire domain name.
 * In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
 * U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
 * All of these will become U+002E (full stop) in the result.
 *
 * @param input the Unicode name
 * @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
 *         or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
 * @return the ACE name
 * @throws IllegalArgumentException if {@code input} does not conform to <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>
 */
public static String toASCII(String input, int flags) {
  return NativeIDN.toASCII(input, flags);
}
origin: MobiVM/robovm

public static String toASCII(String s, int flags) {
  return convert(s, flags, true);
}
origin: com.gluonhq/robovm-rt

  /**
   * Equivalent to {@code toUnicode(input, 0)}.
   *
   * @param input the ACE name
   * @return the Unicode name
   */
  public static String toUnicode(String input) {
    return NativeIDN.toUnicode(input, 0);
  }
}
origin: com.bugvm/bugvm-rt

private static String convert(String s, int flags, boolean toAscii) {
  if (s == null) {
    throw new NullPointerException("s == null");
  }
  return convertImpl(s, flags, toAscii);
}
private static native String convertImpl(String s, int flags, boolean toAscii);
libcore.icuNativeIDN

Most used methods

  • convert
  • convertImpl
  • toASCII
  • toUnicode

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • getContentResolver (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now