Package org.apache.cxf.jaxrs.provider
Class PrimitiveTextProvider<T>
java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
org.apache.cxf.jaxrs.provider.PrimitiveTextProvider<T>
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<T>
,jakarta.ws.rs.ext.MessageBodyWriter<T>
@Consumes("text/plain")
@Produces("text/plain")
public class PrimitiveTextProvider<T>
extends AbstractConfigurableProvider
implements jakarta.ws.rs.ext.MessageBodyReader<T>, jakarta.ws.rs.ext.MessageBodyWriter<T>
-
Field Summary
Fields inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
BUNDLE, LOG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(T t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) readFrom
(Class<T> type, Type genType, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, InputStream is) void
writeTo
(T obj, Class<?> type, Type genType, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream os) Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
-
Constructor Details
-
PrimitiveTextProvider
public PrimitiveTextProvider()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) - Specified by:
isReadable
in interfacejakarta.ws.rs.ext.MessageBodyReader<T>
-
readFrom
public T readFrom(Class<T> type, Type genType, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, InputStream is) throws IOException- Specified by:
readFrom
in interfacejakarta.ws.rs.ext.MessageBodyReader<T>
- Throws:
IOException
-
getSize
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) - Specified by:
getSize
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt) - Specified by:
isWriteable
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T obj, Class<?> type, Type genType, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream os) throws IOException- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<T>
- Throws:
IOException
-