public class TextSerializationContext extends SerializationContext
log, startOfDocument
Constructor and Description |
---|
TextSerializationContext(Writer writer) |
TextSerializationContext(Writer writer,
MessageContext msgContext) |
Modifier and Type | Method and Description |
---|---|
void |
endElement()
Writes the end element tag for the open element.
|
void |
serialize(QName elemQName,
Attributes attributes,
Object value,
QName xmlType,
Boolean sendNull,
Boolean sendType)
Serialize the indicated value as an element with the name
indicated by elemQName.
|
void |
startElement(QName qName,
Attributes attributes)
Writes (using the Writer) the start tag for element QName along with the
indicated attributes and namespace mappings.
|
void |
writeChars(char[] p1,
int p2,
int p3)
Convenience operation to write out (to Writer) the characters
in p1 starting at index p2 for length p3.
|
void |
writeDOMElement(Element el)
Output a DOM representation to a SerializationContext
|
void |
writeString(String string)
Convenience operation to write out (to Writer) the String
|
attributeQName2String, getCurrentMessage, getCurrentXMLType, getDoMultiRefs, getEncoder, getEncoding, getEncodingStyle, getItemQName, getItemType, getMessageContext, getPrefixForURI, getPrefixForURI, getPrefixForURI, getPretty, getQNameForClass, getSerializerForJavaType, getTypeMapping, getTypeMappingRegistry, getValueAsString, isEncoded, isPrimitive, outputMultiRefs, qName2String, qName2String, registerPrefixForURI, serialize, serialize, serialize, serialize, serialize, setDoMultiRefs, setEncoding, setItemQName, setItemType, setPretty, setSendDecl, setTypeAttribute, setWriteXMLType, shouldSendXSIType, writeSafeString, writeXMLDeclaration
public TextSerializationContext(Writer writer)
public TextSerializationContext(Writer writer, MessageContext msgContext)
public void serialize(QName elemQName, Attributes attributes, Object value, QName xmlType, Boolean sendNull, Boolean sendType) throws IOException
SerializationContext
serialize
in class SerializationContext
elemQName
- is the QName of the elementattributes
- are additional attributesvalue
- is the object to serializexmlType
- is the qname of the type or null.sendNull
- determines whether to send null values.sendType
- determines whether to set xsi:type attribute.IOException
public void writeDOMElement(Element el) throws IOException
SerializationContext
writeDOMElement
in class SerializationContext
el
- is a DOM ElementIOException
public void startElement(QName qName, Attributes attributes) throws IOException
SerializationContext
startElement
in class SerializationContext
qName
- is the name of the elementattributes
- are the attributes to writeIOException
public void endElement() throws IOException
SerializationContext
endElement
in class SerializationContext
IOException
public void writeChars(char[] p1, int p2, int p3) throws IOException
SerializationContext
writeChars
in class SerializationContext
p1
- character array to writep2
- starting index in arrayp3
- length to writeIOException
public void writeString(String string) throws IOException
SerializationContext
writeString
in class SerializationContext
string
- is the String to write.IOException
Copyright © The Apache Software Foundation. All Rights Reserved.