code: public static <T extends Map.Entry<String, String>> String formEncode(Collection<T> parameters)
              throws IOException {
          ByteArrayOutputStream b = new ByteArrayOutputStream();
          formEncode(parameters, b);
          return new String(b.toByteArray());
      }
docs: Construct a x-www-form-urlencoded document containing the given sequence
  of name/value pairs. Use OAuth percent encoding (not exactly the encoding
  mandated by x-www-form-urlencoded).