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 TypeMethodDescriptionbooleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom(Class<String> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(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, waitMethods 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:
isReadablein interfaceMessageBodyReader<String>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
isWriteablein 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:
readFromin 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:
writeToin interfaceMessageBodyWriter<String>- Throws:
IOExceptionWebApplicationException
-