com.acsinet_solutions.util.text
Class AlphaCodec

java.lang.Object
  extended by com.acsinet_solutions.util.text.AlphaCodec

public final class AlphaCodec
extends java.lang.Object

Alphanumeric codec, this method converts an arbitrary String of characters into a String of alphanumeric characters plus '_' and '-'. It is not meant to be efficient in size, but to provide a practical way to form valid file identifiers from strings that may include special characters.

Author:
Santiago Arriaga

Constructor Summary
AlphaCodec()
           
 
Method Summary
static java.lang.String getDecoded(java.lang.String str)
          Perform the decoding of the given String.
static java.lang.String getEncoded(java.lang.String str)
          Perform the encoding to alphanumeric.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlphaCodec

public AlphaCodec()
Method Detail

getEncoded

public static java.lang.String getEncoded(java.lang.String str)
Perform the encoding to alphanumeric. A URL encoding plus additional changing "+" to "_" and "%" to "-"


getDecoded

public static java.lang.String getDecoded(java.lang.String str)
Perform the decoding of the given String.