Class MultipartContent.Part (1.42.3)

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
NameDescription
contentHttpContent

HTTP content or null for none

Part(HttpHeaders headers, HttpContent content)

public Part(HttpHeaders headers, HttpContent content)
Parameters
NameDescription
headersHttpHeaders

HTTP headers or null for none

contentHttpContent

HTTP content or null for none

Methods

getContent()

public HttpContent getContent()

Returns the HTTP content or null for none.

Returns
TypeDescription
HttpContent

getEncoding()

public HttpEncoding getEncoding()

Returns the HTTP encoding or null for none.

Returns
TypeDescription
HttpEncoding

getHeaders()

public HttpHeaders getHeaders()

Returns the HTTP headers or null for none.

Returns
TypeDescription
HttpHeaders

setContent(HttpContent content)

public MultipartContent.Part setContent(HttpContent content)

Sets the HTTP content or null for none.

Parameter
NameDescription
contentHttpContent
Returns
TypeDescription
MultipartContent.Part

setEncoding(HttpEncoding encoding)

public MultipartContent.Part setEncoding(HttpEncoding encoding)

Sets the HTTP encoding or null for none.

Parameter
NameDescription
encodingHttpEncoding
Returns
TypeDescription
MultipartContent.Part

setHeaders(HttpHeaders headers)

public MultipartContent.Part setHeaders(HttpHeaders headers)

Sets the HTTP headers or null for none.

Parameter
NameDescription
headersHttpHeaders
Returns
TypeDescription
MultipartContent.Part