simplespider.simplespider.util
Class Punycode

java.lang.Object
  extended by simplespider.simplespider.util.Punycode

public final class Punycode
extends Object

Based on de.anomic.tools.Punycode


Nested Class Summary
static class Punycode.PunycodeException
           
 
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)
           
static boolean isBasic(String input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static String encode(String input)
                     throws Punycode.PunycodeException
Punycodes a unicode string.

Parameters:
input - Unicode string.
Returns:
Punycoded string.
Throws:
Punycode.PunycodeException

decode

public static String decode(String input)
                     throws Punycode.PunycodeException
Decode a punycoded string.

Parameters:
input - Punycode string
Returns:
Unicode string.
Throws:
Punycode.PunycodeException

adapt

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

isBasic

public static final boolean isBasic(char c)

isBasic

public static boolean isBasic(String input)

digit2codepoint

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

codepoint2digit

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


Copyright © 2009. All Rights Reserved.