Class JaxRsStringMessageBodyReaderWriter
java.lang.Object
io.micronaut.jaxrs.common.body.standard.JaxRsStringMessageBodyReaderWriter
- All Implemented Interfaces:
MessageBodyReader<String>
,MessageBodyWriter<String>
@Order(2147483647)
@Prototype
@Internal
public final class JaxRsStringMessageBodyReaderWriter
extends Object
implements MessageBodyReader<String>, MessageBodyWriter<String>
The implementation of
MessageBodyReader
for String
.- Since:
- 4.6
- Author:
- Denis Stepanov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom
(Class<String> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) void
writeTo
(String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.ws.rs.ext.MessageBodyWriter
getSize
-
Constructor Details
-
JaxRsStringMessageBodyReaderWriter
public JaxRsStringMessageBodyReaderWriter()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isReadable
in interfaceMessageBodyReader<String>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isWriteable
in interfaceMessageBodyWriter<String>
-
readFrom
public String readFrom(Class<String> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws WebApplicationException- Specified by:
readFrom
in interfaceMessageBodyReader<String>
- Throws:
WebApplicationException
-
writeTo
public void writeTo(String string, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException- Specified by:
writeTo
in interfaceMessageBodyWriter<String>
- Throws:
IOException
WebApplicationException
-