Java Code Examples for com.sun.xml.internal.bind.v2.runtime.MimeTypedTransducer

Following code examples demonstrate how to use com.sun.xml.internal.bind.v2.runtime.MimeTypedTransducerfrom java. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.sun.xml.internal.bind.v2.runtime.MimeTypedTransducerand various code implementation of this class.

    public static Transducer createTransducer(RuntimeNonElementRef ref) {
        Transducer t = ref.getTarget().getTransducer();
        RuntimePropertyInfo src = ref.getSource();
        ID id =;

            return RuntimeBuiltinLeafInfoImpl.STRING;

            t = new IDTransducerImpl(t);

        MimeType emt = src.getExpectedMimeType();
            t = new MimeTypedTransducer(t,emt);

            t = new InlineBinaryTransducer(t);

        if(src.getSchemaType()!=null) {
            if (src.getSchemaType().equals(createXSSimpleType())) {
                return RuntimeBuiltinLeafInfoImpl.STRING;
            t = new SchemaTypeTransducer(t,src.getSchemaType());

        return t;

Transducer decorator that wraps another Transducer and sets the expected MIME type to the context.

Combined with Transducer implementations (such as one for Image), this is used to control the marshalling of the BLOB types. @author Kohsuke Kawaguchi

Read More