Class MultipartBodyPublisher
java.lang.Object
com.github.mizosoft.methanol.MultipartBodyPublisher
- All Implemented Interfaces:
MimeBodyPublisher, HttpRequest.BodyPublisher, Flow.Publisher<ByteBuffer>
A
BodyPublisher for multipart bodies.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder ofMultipartBodyPublisherinstances.static final classA part in a multipart request body. -
Method Summary
Modifier and TypeMethodDescriptionboundary()Returns the boundary of this multipart body.longReturns the body's media type.Returns a newMultipartBodyPublisher.Builder.parts()Returns an immutable list containing this body's parts.voidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber)
-
Method Details
-
boundary
Returns the boundary of this multipart body. -
parts
Returns an immutable list containing this body's parts. -
mediaType
Description copied from interface:MimeBodyPublisherReturns the body's media type.- Specified by:
mediaTypein interfaceMimeBodyPublisher
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>
-
newBuilder
Returns a newMultipartBodyPublisher.Builder.
-