Class MultipartContent.Part (1.44.2)

public static final class MultipartContent.Part

Single part of a multi-part request.

Implementation is not thread-safe.

Inheritance

java.lang.Object > MultipartContent.Part

Constructors

Part()

public Part()

Part(HttpContent content)

public Part(HttpContent content)
Parameter
Name Description
content HttpContent

HTTP content or null for none

Part(HttpHeaders headers, HttpContent content)

public Part(HttpHeaders headers, HttpContent content)
Parameters
Name Description
headers HttpHeaders

HTTP headers or null for none

content HttpContent

HTTP content or null for none

Methods

getContent()

public HttpContent getContent()

Returns the HTTP content or null for none.

Returns
Type Description
HttpContent

getEncoding()

public HttpEncoding getEncoding()

Returns the HTTP encoding or null for none.

Returns
Type Description
HttpEncoding

getHeaders()

public HttpHeaders getHeaders()

Returns the HTTP headers or null for none.

Returns
Type Description
HttpHeaders

setContent(HttpContent content)

public MultipartContent.Part setContent(HttpContent content)

Sets the HTTP content or null for none.

Parameter
Name Description
content HttpContent
Returns
Type Description
MultipartContent.Part

setEncoding(HttpEncoding encoding)

public MultipartContent.Part setEncoding(HttpEncoding encoding)

Sets the HTTP encoding or null for none.

Parameter
Name Description
encoding HttpEncoding
Returns
Type Description
MultipartContent.Part

setHeaders(HttpHeaders headers)

public MultipartContent.Part setHeaders(HttpHeaders headers)

Sets the HTTP headers or null for none.

Parameter
Name Description
headers HttpHeaders
Returns
Type Description
MultipartContent.Part