Package io.micronaut.http.body
Class CharSequenceBodyWriter
java.lang.Object
io.micronaut.http.body.CharSequenceBodyWriter
- All Implemented Interfaces:
MessageBodyWriter<CharSequence>,TypedMessageBodyWriter<CharSequence>
@Singleton
@Internal
public final class CharSequenceBodyWriter
extends Object
implements TypedMessageBodyWriter<CharSequence>
Body writer for
CharSequences.- Since:
- 4.0.0
- Author:
- Graeme Rocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()voidwriteTo(Argument<CharSequence> type, MediaType mediaType, CharSequence object, MutableHeaders outgoingHeaders, OutputStream outputStream) Writes an object to the given output stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.body.MessageBodyWriter
createSpecific, isBlocking, writeToMethods inherited from interface io.micronaut.http.body.TypedMessageBodyWriter
isWriteable
-
Constructor Details
-
CharSequenceBodyWriter
-
-
Method Details
-
writeTo
public void writeTo(Argument<CharSequence> type, MediaType mediaType, CharSequence object, MutableHeaders outgoingHeaders, OutputStream outputStream) throws CodecException Description copied from interface:MessageBodyWriterWrites an object to the given output stream.- Specified by:
writeToin interfaceMessageBodyWriter<CharSequence>- Parameters:
type- The typemediaType- The media typeobject- The object to writeoutgoingHeaders- The HTTP headersoutputStream- The output stream- Throws:
CodecException- If an error occurs decoding
-
getType
- Specified by:
getTypein interfaceTypedMessageBodyWriter<CharSequence>- Returns:
- The body type.
-