intarsys runtime library

de.intarsys.tools.url
Class URLEncodingTools

java.lang.Object
  extended by de.intarsys.tools.url.URLEncodingTools

public class URLEncodingTools
extends Object

Tool for dealing with URL encoding.


Field Summary
static String CHARSET_DEFAULT
           
 
Constructor Summary
URLEncodingTools()
           
 
Method Summary
static Map<String,String> decodeEntity(String content, String encoding)
          Decode a complete http entity content and return it as a Map.
static String encodeEntity(Map<String,String> parameters, String encoding)
          Encode a Map of key / value pairs to a http entity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARSET_DEFAULT

public static final String CHARSET_DEFAULT
See Also:
Constant Field Values
Constructor Detail

URLEncodingTools

public URLEncodingTools()
Method Detail

decodeEntity

public static Map<String,String> decodeEntity(String content,
                                              String encoding)
                                       throws IOException
Decode a complete http entity content and return it as a Map.

Parameters:
content -
encoding -
Returns:
A map of the key / value pairs in the entity.
Throws:
IOException

encodeEntity

public static String encodeEntity(Map<String,String> parameters,
                                  String encoding)
                           throws UnsupportedEncodingException
Encode a Map of key / value pairs to a http entity.

Parameters:
parameters -
encoding -
Returns:
The encoded entity
Throws:
UnsupportedEncodingException

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.