code: private String decodePercent(String str) {
          StringBuilder sb = new StringBuilder();
          for (int i = 0; i < str.length(); i++) {
              char c = str.charAt(i);
              switch (c) {
                  case '+':
                      sb.append(' ');
                      break;
                  case '%':
                      sb.append((char) Integer.parseInt(str.substring(i + 1, i + 3), 16));
                      i += 2;
                      break;
                  default:
                      sb.append(c);
                      break;
              }
          }
          str = sb.toString();
          if (str.contains("%")) {
              str = decodePercent(str);
          }
          return str;
      }
docs: Decodes the percent encoding scheme. <br/>
  For example: "an+example%20string" -> "an example string"
  @param str a string
  @return altered string