Package org.apache.hc.core5.net
Class WWWFormCodec
- java.lang.Object
-
- org.apache.hc.core5.net.WWWFormCodec
-
public class WWWFormCodec extends java.lang.Objectapplication/x-www-form-urlencodedcodec.- Since:
- 5.1
-
-
Field Summary
Fields Modifier and Type Field Description private static charQP_SEP_A
-
Constructor Summary
Constructors Constructor Description WWWFormCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringformat(java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent string.static voidformat(java.lang.StringBuilder buf, java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent.static java.util.List<NameValuePair>parse(java.lang.CharSequence s, java.nio.charset.Charset charset)Returns a list ofNameValuePairparameters parsed from theapplication/x-www-form-urlencodedcontent.
-
-
-
Field Detail
-
QP_SEP_A
private static final char QP_SEP_A
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static java.util.List<NameValuePair> parse(java.lang.CharSequence s, java.nio.charset.Charset charset)
Returns a list ofNameValuePairparameters parsed from theapplication/x-www-form-urlencodedcontent.- Parameters:
s- input text.charset- parameter charset.- Returns:
- list of form parameters.
-
format
public static void format(java.lang.StringBuilder buf, java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent.- Parameters:
buf- the content bufferparams- The from parameters.charset- The encoding to use.
-
format
public static java.lang.String format(java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)
Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent string.- Parameters:
params- The from parameters.charset- The encoding to use.- Returns:
- content string
-
-