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