Package com.teamdev.jxbrowser.net
Class ContentType.Builder
java.lang.Object
com.teamdev.jxbrowser.net.ContentType.Builder
- Enclosing interface:
- ContentType
A builder of
ContentType
.
Builders are created by invoking ContentType.newBuilder(String)
.
Each of the setter methods modifies the state of the builder and returns the same instance. Builders are not thread-safe and should not be used concurrently from multiple threads without external synchronization.
-
Method Summary
Modifier and TypeMethodDescriptionSets the boundary of themultipart/form-data
associated with the content type.build()
Returns a newContentType
instance built from the current state of this builder.Sets the charset of the data associated with the content type.
-
Method Details
-
charset
Sets the charset of the data associated with the content type.- Throws:
IllegalArgumentException
- if thecharset
is empty or blank
-
boundary
Sets the boundary of themultipart/form-data
associated with the content type.- Throws:
IllegalArgumentException
- if theboundary
is empty or blank
-
build
Returns a newContentType
instance built from the current state of this builder.
-