Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime

public final Class MimeTypedTransducer<V>

extends FilterTransducer<V>
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, jakarta.activation.MimeType, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.awt.*, java.io.IOException

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

Field Summary

Modifier and TypeField and Description
private final MimeType
Inherited from org.glassfish.jaxb.runtime.v2.runtime.FilterTransducer:
core

Constructor Summary

AccessConstructor and Description
public
MimeTypedTransducer(Transducer<V> core, MimeType expectedMimeType)

Method Summary

Modifier and TypeMethod and Description
public void
public void
writeText(XMLSerializer w, V o, String fieldName)

Overrides org.glassfish.jaxb.runtime.v2.runtime.FilterTransducer.writeText.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.FilterTransducer:
declareNamespacegetTypeNameparseuseNamespace

Field Detail

expectedMimeTypeback to summary
private final MimeType expectedMimeType

Constructor Detail

MimeTypedTransducerback to summary
public MimeTypedTransducer(Transducer<V> core, MimeType expectedMimeType)

Method Detail

writeLeafElementback to summary
public void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Overrides org.glassfish.jaxb.runtime.v2.runtime.FilterTransducer.writeLeafElement.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Sends the result of the print(Object) operation to one of the XMLSerializer#leafElement(Name, String, String) method. but with the best representation of the value, not necessarily String.

Annotations
@Override
writeTextback to summary
public void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Overrides org.glassfish.jaxb.runtime.v2.runtime.FilterTransducer.writeText.

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Annotations
@Override