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 Stringprivate longprivate final ProgressMonitorprivate static final longprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMultipartBodyPublisher(List<Part> parts, ProgressMonitor monitor, String boundary) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendHeader(StringBuilder target, String name, String value) (package private) static voidappendPartHeaders(StringBuilder target, Part part) (package private) Stringboundary()private longlong(package private) static MultipartBodyPublisher.BuildernewBuilder(String boundary) Returns a newMultipartBodyPublisher.Builder.parts()voidsubscribe(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:
contentLengthin interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>
-
computeLength
private long computeLength() -
appendPartHeaders
-
appendHeader
-
newBuilder
Returns a newMultipartBodyPublisher.Builder.
-