Package kong.unirest.core.java
Class MultipartBodyPublisher
java.lang.Object
kong.unirest.core.java.MultipartBodyPublisher
- All Implemented Interfaces:
HttpRequest.BodyPublisher
,Flow.Publisher<ByteBuffer>
A
BodyPublisher
implementing the multipart request type.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private long
private final ProgressMonitor
private static final long
private static final long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
MultipartBodyPublisher
(List<Part> parts, ProgressMonitor monitor, String boundary) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
appendHeader
(StringBuilder target, String name, String value) (package private) static void
appendPartHeaders
(StringBuilder target, Part part) (package private) String
boundary()
private long
long
(package private) static MultipartBodyPublisher.Builder
newBuilder
(String boundary) Returns a newMultipartBodyPublisher.Builder
.parts()
void
subscribe
(Flow.Subscriber<? super ByteBuffer> subscriber)
-
Field Details
-
UNKNOWN_LENGTH
private static final long UNKNOWN_LENGTH- See Also:
-
UNINITIALIZED_LENGTH
private static final long UNINITIALIZED_LENGTH- See Also:
-
parts
-
monitor
-
boundary
-
contentLength
private long contentLength
-
-
Constructor Details
-
MultipartBodyPublisher
-
-
Method Details
-
boundary
String boundary() -
parts
-
contentLength
public long contentLength()- Specified by:
contentLength
in interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribe
in interfaceFlow.Publisher<ByteBuffer>
-
computeLength
private long computeLength() -
appendPartHeaders
-
appendHeader
-
newBuilder
Returns a newMultipartBodyPublisher.Builder
.
-