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 BodyPartBodyStreamWritercreate()Create a new instance ofBodyPartBodyStreamWriterwith the default boundary delimiter.static BodyPartBodyStreamWriterCreate a new instance ofBodyPartBodyStreamWriterwith 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, waitMethods inherited from interface io.helidon.media.common.MessageBodyStreamWriter
marshall
-
Method Details
-
accept
public MessageBodyOperator.PredicateResult accept(GenericType<?> type, MessageBodyWriterContext context) Description copied from interface:MessageBodyOperatorTest if the operator can convert the given type.- Specified by:
acceptin interfaceMessageBodyOperator<MessageBodyWriterContext>- Parameters:
type- the requested typecontext- the context providing the headers abstraction- Returns:
MessageBodyOperator.PredicateResultresult
-
write
public Flow.Publisher<DataChunk> write(Flow.Publisher<? extends WriteableBodyPart> content, GenericType<? extends WriteableBodyPart> type, MessageBodyWriterContext context) Description copied from interface:MessageBodyStreamWriterGenerate HTTP payload from the given stream of objects.- Specified by:
writein interfaceMessageBodyStreamWriter<WriteableBodyPart>- Parameters:
content- objects to convert to payloadtype- requested type representationcontext- writer context- Returns:
- HTTP payload publisher
-
create
Create a new instance ofBodyPartBodyStreamWriterwith the default boundary delimiter.- Returns:
- BodyPartStreamWriter
- See Also:
-
create
Create a new instance ofBodyPartBodyStreamWriterwith the specified boundary delimiter.- Parameters:
boundary- boundary string- Returns:
- BodyPartStreamWriter
-