Class URLEncodedFormContent
- java.lang.Object
-
- net.lenni0451.commons.httpclient.content.HttpContent
-
- net.lenni0451.commons.httpclient.content.impl.URLEncodedFormContent
-
public class URLEncodedFormContent extends HttpContent
-
-
Field Summary
-
Fields inherited from class net.lenni0451.commons.httpclient.content.HttpContent
content
-
-
Constructor Summary
Constructors Constructor Description URLEncodedFormContent()URLEncodedFormContent(java.nio.charset.Charset charset)URLEncodedFormContent(java.util.Map<java.lang.String,java.lang.String> entries)URLEncodedFormContent(java.util.Map<java.lang.String,java.lang.String> entries, java.nio.charset.Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]compute()intgetContentLength()URLEncodedFormContentput(java.lang.String key, java.lang.String value)Add a new entry to the form.-
Methods inherited from class net.lenni0451.commons.httpclient.content.HttpContent
bytes, bytes, file, form, form, getAsBytes, getAsString, getAsString, getContentType, string, string
-
-
-
-
Constructor Detail
-
URLEncodedFormContent
public URLEncodedFormContent()
-
URLEncodedFormContent
public URLEncodedFormContent(java.util.Map<java.lang.String,java.lang.String> entries)
-
URLEncodedFormContent
public URLEncodedFormContent(java.nio.charset.Charset charset)
-
URLEncodedFormContent
public URLEncodedFormContent(java.util.Map<java.lang.String,java.lang.String> entries, java.nio.charset.Charset charset)
-
-
Method Detail
-
put
public URLEncodedFormContent put(java.lang.String key, java.lang.String value)
Add a new entry to the form.- Parameters:
key- The keyvalue- The value- Returns:
- This instance for chaining
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin classHttpContent- Returns:
- The content length
-
compute
@Nonnull protected byte[] compute()
- Specified by:
computein classHttpContent- Returns:
- The content
-
-