Top Description Fields Constructors Methods
org.apache.hc.core5.net

public Class WWWFormCodec

extends Object
Class Inheritance
Imports
java.nio.charset.Charset, java.util.List, org.apache.hc.core5.http.NameValuePair

application/x-www-form-urlencoded codec.
Since
5.1

Field Summary

Modifier and TypeField and Description
private static final char

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
format(final StringBuilder
the content buffer
buf
,
final Iterable<? extends NameValuePair>
The from parameters.
params
,
final Charset
The encoding to use.
charset
)

Formats the list of NameValuePair parameters into a application/x-www-form-urlencoded content.

public static String

Returns:

content string
format
(final Iterable<? extends NameValuePair>
The from parameters.
params
,
final Charset
The encoding to use.
charset
)

Formats the list of NameValuePair parameters into a application/x-www-form-urlencoded content string.

public static List<NameValuePair>

Returns:

list of form parameters.
parse
(final CharSequence
input text.
s
,
final Charset
parameter charset.
charset
)

Returns a list of NameValuePair parameters parsed from the application/x-www-form-urlencoded content.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

QP_SEP_Aback to summary
private static final char QP_SEP_A

Constructor Detail

WWWFormCodecback to summary
public WWWFormCodec()

Method Detail

formatback to summary
public static void format(final StringBuilder buf, final Iterable<? extends NameValuePair> params, final Charset charset)

Formats the list of NameValuePair parameters into a application/x-www-form-urlencoded content.

Parameters
buf:StringBuilder

the content buffer

params:Iterable<? extends NameValuePair>

The from parameters.

charset:Charset

The encoding to use.

formatback to summary
public static String format(final Iterable<? extends NameValuePair> params, final Charset charset)

Formats the list of NameValuePair parameters into a application/x-www-form-urlencoded content string.

Parameters
params:Iterable<? extends NameValuePair>

The from parameters.

charset:Charset

The encoding to use.

Returns:String

content string

parseback to summary
public static List<NameValuePair> parse(final CharSequence s, final Charset charset)

Returns a list of NameValuePair parameters parsed from the application/x-www-form-urlencoded content.

Parameters
s:CharSequence

input text.

charset:Charset

parameter charset.

Returns:List<NameValuePair>

list of form parameters.