Package org.apache.hc.core5.net
Class WWWFormCodec
- java.lang.Object
-
- org.apache.hc.core5.net.WWWFormCodec
-
public class WWWFormCodec extends java.lang.Object
application/x-www-form-urlencoded
codec.- Since:
- 5.1
-
-
Field Summary
Fields Modifier and Type Field Description private static char
QP_SEP_A
-
Constructor Summary
Constructors Constructor Description WWWFormCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
format(java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)
Formats the list ofNameValuePair
parameters into aapplication/x-www-form-urlencoded
content string.static void
format(java.lang.StringBuilder buf, java.lang.Iterable<? extends NameValuePair> params, java.nio.charset.Charset charset)
Formats the list ofNameValuePair
parameters into aapplication/x-www-form-urlencoded
content.static java.util.List<NameValuePair>
parse(java.lang.CharSequence s, java.nio.charset.Charset charset)
Returns a list ofNameValuePair
parameters parsed from theapplication/x-www-form-urlencoded
content.
-
-
-
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 ofNameValuePair
parameters parsed from theapplication/x-www-form-urlencoded
content.- 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 ofNameValuePair
parameters into aapplication/x-www-form-urlencoded
content.- 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 ofNameValuePair
parameters into aapplication/x-www-form-urlencoded
content string.- Parameters:
params
- The from parameters.charset
- The encoding to use.- Returns:
- content string
-
-