code: public static String decodeHttpParams(String str)
      {
          if (str == null) {
              return "";
          }
          StringBuffer buf = new StringBuffer();
          char[] array = str.toCharArray();
          for (int i = 0; i < array.length; i++) {
              char ch = array[i];
              if (ch == '%') {
                  if (i + 2 >= array.length) {
                      break;
                  }
                  int val = (array[++i] - '0');
                  val <<= 4;
                  val |= (array[++i] - '0');
                  ch = (char) val;
              }
              buf.append(ch);
          }
          return buf.toString();
      }
docs: Returns the decoded http string - all special symbols, replaced by
  replaced by the %[HEX HEX] sequence, where [HEX HEX] is the hexadecimal
  code of the escaped symbol will be restored to its original characters
  (see RFC-2616 http://www.w3.org/Protocols/rfc2616/).
  
  @param str the string to decode
  @return the decoded string.