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