java.lang.Object
io.helidon.media.multipart.BodyPartBodyStreamWriter
- All Implemented Interfaces:
MessageBodyOperator<MessageBodyWriterContext>
,MessageBodyStreamWriter<WriteableBodyPart>
public final class BodyPartBodyStreamWriter
extends Object
implements MessageBodyStreamWriter<WriteableBodyPart>
WriteableBodyPart
stream writer.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.media.common.MessageBodyOperator
MessageBodyOperator.PredicateResult
-
Method Summary
Modifier and TypeMethodDescriptionaccept
(GenericType<?> type, MessageBodyWriterContext context) Test if the operator can convert the given type.static BodyPartBodyStreamWriter
create()
Create a new instance ofBodyPartBodyStreamWriter
with the default boundary delimiter.static BodyPartBodyStreamWriter
Create a new instance ofBodyPartBodyStreamWriter
with the specified boundary delimiter.write
(Flow.Publisher<? extends WriteableBodyPart> content, GenericType<? extends WriteableBodyPart> type, MessageBodyWriterContext context) Generate HTTP payload from the given stream of objects.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.media.common.MessageBodyStreamWriter
marshall
-
Method Details
-
accept
public MessageBodyOperator.PredicateResult accept(GenericType<?> type, MessageBodyWriterContext context) Description copied from interface:MessageBodyOperator
Test if the operator can convert the given type.- Specified by:
accept
in interfaceMessageBodyOperator<MessageBodyWriterContext>
- Parameters:
type
- the requested typecontext
- the context providing the headers abstraction- Returns:
MessageBodyOperator.PredicateResult
result
-
write
public Flow.Publisher<DataChunk> write(Flow.Publisher<? extends WriteableBodyPart> content, GenericType<? extends WriteableBodyPart> type, MessageBodyWriterContext context) Description copied from interface:MessageBodyStreamWriter
Generate HTTP payload from the given stream of objects.- Specified by:
write
in interfaceMessageBodyStreamWriter<WriteableBodyPart>
- Parameters:
content
- objects to convert to payloadtype
- requested type representationcontext
- writer context- Returns:
- HTTP payload publisher
-
create
Create a new instance ofBodyPartBodyStreamWriter
with the default boundary delimiter.- Returns:
- BodyPartStreamWriter
- See Also:
-
create
Create a new instance ofBodyPartBodyStreamWriter
with the specified boundary delimiter.- Parameters:
boundary
- boundary string- Returns:
- BodyPartStreamWriter
-