public class DataHandlerType extends AbstractXOPType
DataHandler
. This assumes that the DataHandler will always
contain a DataSource
, not data in the Object.XML_MIME_ATTR_LOCAL_NAME, XML_MIME_BASE64, XML_MIME_CONTENT_TYPE, XML_MIME_NS, XOP_HREF, XOP_INCLUDE, XOP_NS
Constructor and Description |
---|
DataHandlerType(boolean useXmimeContentType,
String expectedContentTypes) |
Modifier and Type | Method and Description |
---|---|
protected Attachment |
createAttachment(Object object,
String id) |
protected byte[] |
getBytes(Object object)
if MtoM is not enabled, we need bytes to turn into base64.
|
protected String |
getContentType(Object object,
Context context) |
protected Object |
readAttachment(Attachment att,
Context context) |
protected Object |
wrapBytes(byte[] bareBytes,
String contentType)
If one of these types arrives unoptimized, we need to convert it to the
desired return type.
|
addToSchemaElement, readMtoM, readObject, usesXmime, writeObject
equals, getDependencies, getMaxOccurs, getMinOccurs, getSchemaType, getType, getTypeClass, getTypeMapping, hashCode, hasMaxOccurs, hasMinOccurs, isAbstract, isComplex, isFlatArray, isNillable, isWriteOuter, setAbstract, setFlatArray, setNillable, setSchemaType, setTypeClass, setTypeMapping, setWriteOuter, toString, usesUtilityTypes, writeSchema
public DataHandlerType(boolean useXmimeContentType, String expectedContentTypes)
protected Object readAttachment(Attachment att, Context context)
readAttachment
in class AbstractXOPType
protected Attachment createAttachment(Object object, String id)
createAttachment
in class AbstractXOPType
protected String getContentType(Object object, Context context)
getContentType
in class AbstractXOPType
protected Object wrapBytes(byte[] bareBytes, String contentType)
AbstractXOPType
wrapBytes
in class AbstractXOPType
bareBytes
- the bytes pulled out of the base64.contentType
- when we support xmime:contentType, this will be passed along.protected byte[] getBytes(Object object)
AbstractXOPType
getBytes
in class AbstractXOPType
Apache CXF