org.gcube.opensearch.opensearchlibrary.utils
Class URLEncoder

java.lang.Object
  extended by org.gcube.opensearch.opensearchlibrary.utils.URLEncoder

public class URLEncoder
extends java.lang.Object

A URL encoder utility that is used to URL-encode strings only if they are not already URL-encoded

Author:
gerasimos.farantatos

Method Summary
static java.lang.String UrlEncode(java.lang.String value, java.lang.String encoding)
          URL-encodes a String only if it is not found already URL-encoded
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

UrlEncode

public static java.lang.String UrlEncode(java.lang.String value,
                                         java.lang.String encoding)
                                  throws java.io.UnsupportedEncodingException
URL-encodes a String only if it is not found already URL-encoded

Parameters:
value - The String to be URL-encoded
encoding - The encoding to be used
Returns:
The URL-encoded string
Throws:
java.io.UnsupportedEncodingException - If the encoding given is not supported