com.ls.util.text
Class HTTPEncodeDecode

java.lang.Object
  |
  +--com.ls.util.text.HTTPEncodeDecode

public class HTTPEncodeDecode
extends Object

This class is encoding and decoding strings that have to be passed within a URL. It's mainly used within the com.ls.internet.generic.LinkResolve Class.

Version:
$Revision: 1.0 $
Author:
Last modified by $Author: TBerk $

Constructor Summary
HTTPEncodeDecode()
           
 
Method Summary
static String decode(String stringToDecode)
          Decode a string that is encoded to the original one.
static String encode(String stringToEncode)
          Encode a string that will be included in a URL String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPEncodeDecode

public HTTPEncodeDecode()
Method Detail

encode

public static String encode(String stringToEncode)
Encode a string that will be included in a URL String.
 Example: 	 
		String to encode:	Das ist=&blub? 
		Encoded string:		Das%20ist%3d%26blub%3f
 
Parameters:
stringToEncode - string that has to be encoded
Returns:
encoded string OR null if the string to encode is also null

decode

public static String decode(String stringToDecode)
Decode a string that is encoded to the original one.
 Example: 	 
		String to decode:	Das%20ist%3d%26blub%3f
		decoded string:		Das ist=&blub? 
 
Parameters:
stringToDecode - string that has to be decoded
Returns:
Decoded string OR null if the stringToDecode is also null