Transducer<V>public final class MimeTypedTransducer<V> extends FilterTransducer<V>
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.
core| Constructor | Description |
|---|---|
MimeTypedTransducer(Transducer<V> core,
javax.activation.MimeType expectedMimeType) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.CharSequence |
print(V o) |
Converts the given value to its lexical representation.
|
void |
writeLeafElement(XMLSerializer w,
Name tagName,
V o,
java.lang.String fieldName) |
Sends the result of the
Transducer.print(Object) operation
to one of the XMLSerializer.leafElement(Name, String, String) method. |
void |
writeText(XMLSerializer w,
V o,
java.lang.String fieldName) |
Sends the result of the
Transducer.print(Object) operation
to one of the XMLSerializer.text(String, String) method,
but with the best representation of the value, not necessarily String. |
declareNamespace, getTypeName, isDefault, parse, useNamespacepublic MimeTypedTransducer(Transducer<V> core, javax.activation.MimeType expectedMimeType)
public java.lang.CharSequence print(V o) throws AccessorException
Transducerprint in interface Transducer<V>print in class FilterTransducer<V>o - never be null.AccessorExceptionpublic void writeText(XMLSerializer w, V o, java.lang.String fieldName) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, AccessorException
TransducerTransducer.print(Object) operation
to one of the XMLSerializer.text(String, String) method,
but with the best representation of the value, not necessarily String.writeText in interface Transducer<V>writeText in class FilterTransducer<V>java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.stream.XMLStreamExceptionAccessorExceptionpublic void writeLeafElement(XMLSerializer w, Name tagName, V o, java.lang.String fieldName) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, AccessorException
TransducerTransducer.print(Object) operation
to one of the XMLSerializer.leafElement(Name, String, String) method.
but with the best representation of the value, not necessarily String.writeLeafElement in interface Transducer<V>writeLeafElement in class FilterTransducer<V>java.io.IOExceptionorg.xml.sax.SAXExceptionjavax.xml.stream.XMLStreamExceptionAccessorExceptionCopyright © 2018 Oracle Corporation. All rights reserved.