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
Modifier and TypeClassDescriptionstatic final class
A builder ofMultipartBodyPublisher
instances.static final class
A part in a multipart request body. -
Method Summary
Modifier and TypeMethodDescriptionboundary()
Returns the boundary of this multipart body.long
Returns the body's media type.Returns a newMultipartBodyPublisher.Builder
.parts()
Returns an immutable list containing this body's parts.void
subscribe
(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:MimeBodyPublisher
Returns the body's media type.- Specified by:
mediaType
in interfaceMimeBodyPublisher
-
contentLength
public long contentLength()- Specified by:
contentLength
in interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribe
in interfaceFlow.Publisher<ByteBuffer>
-
newBuilder
Returns a newMultipartBodyPublisher.Builder
.
-