code: private String getEscapedValue(String value) {
          if (value != null) {
              try {
                  return URLEncoder.encode(value, "UTF-8");
                  
              } catch ( UnsupportedEncodingException ex) { }            
          }
          
          return "";
      }
docs: Encode the parameter value for a correct URL introduction
  @param value the value that need to be encoded
  @return the Encoded value