public String urlEncode(){
  StringBuilder sb=new StringBuilder();
  for (  String key : map.keySet()) {
    if (sb.length() > 0) {
      sb.append("&");
    }
    sb.append(key);
    String value=map.get(key);
    if (value != null) {
      sb.append("=");
      try {
        sb.append(URLEncoder.encode(value,RequestHandler.UTF8));
      }
 catch (      UnsupportedEncodingException e) {
        e.printStackTrace();
      }
    }
  }
  return sb.toString();
}

public String urlEncode ( ) { StringBuilder sb = new StringBuilder ( ) ; for ( String key : map . keySet ( ) ) { if ( sb . length ( ) > 0 ) { sb . append ( "&" ) ; } sb . append ( key ) ; String value = map . get ( key ) ; if ( value != null ) { sb . append ( "=" ) ; try { sb . append ( URLEncoder . encode ( value , RequestHandler . UTF8 ) ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } } } return sb . toString ( ) ; }
returns url encoded data
