Package org.apache.http.entity.mime
Class MultipartEntityBuilder
java.lang.Object
org.apache.http.entity.mime.MultipartEntityBuilder
Builder for multipart
HttpEntity
s.- Since:
- 4.3
-
Method Summary
Modifier and TypeMethodDescriptionaddBinaryBody
(String name, byte[] b) addBinaryBody
(String name, byte[] b, org.apache.http.entity.ContentType contentType, String filename) addBinaryBody
(String name, File file) addBinaryBody
(String name, File file, org.apache.http.entity.ContentType contentType, String filename) addBinaryBody
(String name, InputStream stream) addBinaryBody
(String name, InputStream stream, org.apache.http.entity.ContentType contentType, String filename) addPart
(String name, ContentBody contentBody) addPart
(FormBodyPart bodyPart) addTextBody
(String name, String text) addTextBody
(String name, String text, org.apache.http.entity.ContentType contentType) org.apache.http.HttpEntity
build()
static MultipartEntityBuilder
create()
seContentType
(org.apache.http.entity.ContentType contentType) Deprecated.setBoundary
(String boundary) setCharset
(Charset charset) setContentType
(org.apache.http.entity.ContentType contentType) setMimeSubtype
(String subType) setMode
(HttpMultipartMode mode)
-
Method Details
-
create
-
setMode
-
setLaxMode
-
setStrictMode
-
setBoundary
-
setMimeSubtype
- Since:
- 4.4
-
seContentType
@Deprecated public MultipartEntityBuilder seContentType(org.apache.http.entity.ContentType contentType) Deprecated.- Since:
- 4.4
-
setContentType
- Since:
- 4.5
-
setCharset
-
addPart
- Since:
- 4.4
-
addPart
-
addTextBody
public MultipartEntityBuilder addTextBody(String name, String text, org.apache.http.entity.ContentType contentType) -
addTextBody
-
addBinaryBody
public MultipartEntityBuilder addBinaryBody(String name, byte[] b, org.apache.http.entity.ContentType contentType, String filename) -
addBinaryBody
-
addBinaryBody
public MultipartEntityBuilder addBinaryBody(String name, File file, org.apache.http.entity.ContentType contentType, String filename) -
addBinaryBody
-
addBinaryBody
public MultipartEntityBuilder addBinaryBody(String name, InputStream stream, org.apache.http.entity.ContentType contentType, String filename) -
addBinaryBody
-
build
public org.apache.http.HttpEntity build()
-
setContentType(org.apache.http.entity.ContentType)
.