congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Finding current android device location
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BoxLayout (javax.swing)
  • JLabel (javax.swing)
  • JList (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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