gnu.inet.encoding

Class Punycode


public class Punycode
extends java.lang.Object

Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Author: Oliver Hitz This file is part of GNU Libidn. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Method Summary

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)

Method Details

adapt

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

codepoint2digit

public static final int codepoint2digit(int c)
            throws PunycodeException

decode

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

digit2codepoint

public static final int digit2codepoint(int d)
            throws PunycodeException

encode

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

isBasic

public static final boolean isBasic(char c)