|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.squareup.mimecraft.Part.Builder
public static class Part.Builder
Fluent API to build Part
instances.
Constructor Summary | |
---|---|
Part.Builder()
|
Method Summary | |
---|---|
Part.Builder |
body(byte[] body)
Use the specified bytes as the body. |
Part.Builder |
body(File body)
Use the specified file as the body. |
Part.Builder |
body(InputStream body)
Use the specified stream as the body. |
Part.Builder |
body(Multipart body)
Use the specified Multipart as the body. |
Part.Builder |
body(String body)
Use the specified string as the body. |
Part |
build()
Assemble the specified headers and body into a Part . |
Part.Builder |
contentDisposition(String disposition)
Set the Content-Disposition header value. |
Part.Builder |
contentEncoding(String encoding)
Set the Content-Transfer-Encoding header value. |
Part.Builder |
contentLanguage(String language)
Set the Content-Language header value. |
Part.Builder |
contentLength(int length)
Set the Content-Length header value. |
Part.Builder |
contentType(String type)
Set the Content-Type header value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Part.Builder()
Method Detail |
---|
public Part.Builder contentType(String type)
Content-Type
header value.
public Part.Builder contentLength(int length)
Content-Length
header value.
public Part.Builder contentLanguage(String language)
Content-Language
header value.
public Part.Builder contentEncoding(String encoding)
Content-Transfer-Encoding
header value.
public Part.Builder contentDisposition(String disposition)
Content-Disposition
header value.
public Part.Builder body(File body)
public Part.Builder body(InputStream body)
public Part.Builder body(String body)
public Part.Builder body(byte[] body)
public Part.Builder body(Multipart body)
Multipart
as the body.
public Part build()
Part
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |