public class HTTPFormBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HTTPFormBuilder.Field |
protected static class |
HTTPFormBuilder.Sort |
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
static Charset |
DFALTCHARSET |
protected Map<String,HTTPFormBuilder.Field> |
parts |
protected boolean |
usemultipart |
| Constructor and Description |
|---|
HTTPFormBuilder() |
| Modifier and Type | Method and Description |
|---|---|
HTTPFormBuilder |
add(String fieldname,
byte[] content,
String filename) |
HTTPFormBuilder |
add(String fieldname,
File content) |
HTTPFormBuilder |
add(String fieldname,
InputStream content,
String filename) |
HTTPFormBuilder |
add(String fieldname,
String text) |
org.apache.http.HttpEntity |
build() |
protected org.apache.http.HttpEntity |
buildmultipart() |
protected org.apache.http.HttpEntity |
buildsimple() |
String |
getCharset() |
protected boolean |
isempty(String x) |
HTTPFormBuilder |
setCharset(Charset charset) |
HTTPFormBuilder |
setCharset(String charset) |
public static final Charset DFALTCHARSET
protected Map<String,HTTPFormBuilder.Field> parts
protected Charset charset
protected boolean usemultipart
public String getCharset()
public HTTPFormBuilder setCharset(String charset)
public HTTPFormBuilder setCharset(Charset charset)
public HTTPFormBuilder add(String fieldname, String text) throws HTTPException
HTTPExceptionpublic HTTPFormBuilder add(String fieldname, byte[] content, String filename) throws HTTPException
HTTPExceptionpublic HTTPFormBuilder add(String fieldname, InputStream content, String filename) throws HTTPException
HTTPExceptionpublic HTTPFormBuilder add(String fieldname, File content) throws HTTPException
HTTPExceptionpublic org.apache.http.HttpEntity build()
throws HTTPException
HTTPExceptionprotected org.apache.http.HttpEntity buildsimple()
throws HTTPException
HTTPExceptionprotected org.apache.http.HttpEntity buildmultipart()
throws HTTPException
HTTPExceptionprotected boolean isempty(String x)