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());
}

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 ( ) ) ; }
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 ) .
