T - typepublic abstract class AbstractJAXBProvider<T> extends AbstractEntityProvider<T> implements AsyncBufferedMessageBodyWriter<T>
| Modifier and Type | Field and Description |
|---|---|
protected javax.ws.rs.ext.Providers |
providers |
| Constructor and Description |
|---|
AbstractJAXBProvider() |
| Modifier and Type | Method and Description |
|---|---|
static Marshaller |
decorateMarshaller(Class type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
Marshaller marshaller) |
static Unmarshaller |
decorateUnmarshaller(Class type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
Unmarshaller marshaller) |
JAXBContext |
findJAXBContext(Class<?> type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
boolean reader) |
static String |
getCharset(javax.ws.rs.core.MediaType mediaType)
Gets the character set from media type.
|
protected Marshaller |
getMarshaller(Class<?> type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Retrieve JAXB marshaller.
|
boolean |
isDisableDTDs() |
boolean |
isDisableExternalEntities() |
boolean |
isEnableSecureProcessingFeature() |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected abstract boolean |
isReadWritable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected boolean |
needsSecurity() |
protected T |
processWithSecureProcessing(Unmarshaller unmarshaller,
InputStream entityStream,
String charset) |
T |
readFrom(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
static void |
setCharset(javax.ws.rs.core.MediaType mediaType,
Marshaller marshaller) |
void |
setDisableDTDs(boolean disableDTDs) |
void |
setDisableExternalEntities(boolean disableExternalEntities) |
void |
setEnableSecureProcessingFeature(boolean enableSecureProcessingFeature) |
void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream outputStream) |
getSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasyncWriteTopublic JAXBContext findJAXBContext(Class<?> type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, boolean reader) throws JAXBException
JAXBExceptionpublic static Marshaller decorateMarshaller(Class type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, Marshaller marshaller) throws JAXBException
JAXBExceptionpublic static Unmarshaller decorateUnmarshaller(Class type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, Unmarshaller marshaller) throws JAXBException
JAXBExceptionpublic T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>IOExceptionpublic void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream outputStream) throws IOException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>IOExceptionprotected Marshaller getMarshaller(Class<?> type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
type - typeannotations - annotationsmediaType - media typepublic static void setCharset(javax.ws.rs.core.MediaType mediaType,
Marshaller marshaller)
throws PropertyException
PropertyExceptionprotected abstract boolean isReadWritable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>public static String getCharset(javax.ws.rs.core.MediaType mediaType)
mediaType - media typepublic boolean isDisableExternalEntities()
public void setDisableExternalEntities(boolean disableExternalEntities)
public boolean isEnableSecureProcessingFeature()
public void setEnableSecureProcessingFeature(boolean enableSecureProcessingFeature)
public boolean isDisableDTDs()
public void setDisableDTDs(boolean disableDTDs)
protected boolean needsSecurity()
protected T processWithSecureProcessing(Unmarshaller unmarshaller, InputStream entityStream, String charset) throws JAXBException
JAXBExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.