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 and Description
    `Punycode()`

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### Punycode

          public Punycode()

  - ### Method Detail

    - #### encode

          public static String encode(String input)
                               throws PunycodeException

      Punycodes a unicode string.
      Parameters:
        `input` - Unicode string.
      Returns:
        Punycoded string.
      Throws:
        `PunycodeException`

    - #### decode

          public static String decode(String input)
                               throws PunycodeException

      Decode a punycoded string.
      Parameters:
        `input` - Punycode string
      Returns:
        Unicode string.
      Throws:
        `PunycodeException`

    - #### adapt

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

    - #### isBasic

          public static final boolean isBasic(char c)

    - #### digit2codepoint

          public static final int digit2codepoint(int d)
                                           throws PunycodeException

      Throws:
        `PunycodeException`

    - #### codepoint2digit

          public static final int codepoint2digit(int c)
                                           throws PunycodeException

      Throws:
        `PunycodeException`

Copyright © 2022 "Tigase, Inc.". All rights reserved.