public static interface Part.Factory
A factory for creating Part
.
- Since:
- 1.6
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionCreates a part with raw data.Creates a part with a resource as data.<T extends CharSequence>
Part<T> Creates a part with string data.
-
Method Details
-
raw
Creates a part with raw data.
- Parameters:
partConfigurer
- a part configurer- Returns:
- a new part
-
string
Creates a part with string data.
- Type Parameters:
T
- the type of char sequence- Parameters:
partConfigurer
- a part configurer- Returns:
- a new part
-
resource
Creates a part with a resource as data.
The name of the resource shall be used as file name if no explicit file name is specified on the part. In a same way,
content-type
andcontent-length
headers shall also be automatically set in the part if not explicitly specified.- Parameters:
partConfigurer
- a pat configurer- Returns:
- a new part
-