Package gnu.inet.encoding

# Class Punycode

java.lang.Object
gnu.inet.encoding.Punycode

public class Punycode extends Object
This class offers static methods for encoding/decoding strings using the Punycode algorithm.

- RFC3492 Punycode

Note that this implementation only supports 16-bit Unicode code points.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Punycode()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static final int`
  `adapt(int delta, int numpoints, boolean first)`
  `static final int`
  `codepoint2digit(int c)`
  `static String`
  `decode(String input)`
  Decode a punycoded string.
  `static final int`
  `digit2codepoint(int d)`
  `static String`
  `encode(String input)`
  Punycodes a unicode string.
  `static final boolean`
  `isBasic(char c)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Punycode

    public Punycode()

- ## Method Details

  - ### adapt

    public static final int adapt(int delta, int numpoints, boolean first)

  - ### codepoint2digit

    public static final int codepoint2digit(int c) throws PunycodeException
    Throws:
      `PunycodeException`

  - ### decode

    public static String decode(String input) throws PunycodeException
    Decode a punycoded string.
    Parameters:
      `input` - Punycode string
    Returns:
      Unicode string.
    Throws:
      `PunycodeException`

  - ### digit2codepoint

    public static final int digit2codepoint(int d) throws PunycodeException
    Throws:
      `PunycodeException`

  - ### encode

    public static String encode(String input) throws PunycodeException
    Punycodes a unicode string.
    Parameters:
      `input` - Unicode string.
    Returns:
      Punycoded string.
    Throws:
      `PunycodeException`

  - ### isBasic

    public static final boolean isBasic(char c)