public class ByteArrayType extends AbstractXOPType
XML_MIME_ATTR_LOCAL_NAME, XML_MIME_BASE64, XML_MIME_CONTENT_TYPE, XML_MIME_NS, XOP_HREF, XOP_INCLUDE, XOP_NS
Constructor and Description |
---|
ByteArrayType(boolean useXmimeBinaryType,
String expectedContentTypes) |
Modifier and Type | Method and Description |
---|---|
static void |
copy(InputStream input,
OutputStream output) |
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 ByteArrayType(boolean useXmimeBinaryType, String expectedContentTypes)
protected Object readAttachment(Attachment att, Context context) throws IOException
readAttachment
in class AbstractXOPType
IOException
public static void copy(InputStream input, OutputStream output) throws IOException
IOException
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