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, writeXMLDeclarationpublic 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
SerializationContextserialize in class SerializationContextelemQName - 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.IOExceptionpublic void writeDOMElement(Element el) throws IOException
SerializationContextwriteDOMElement in class SerializationContextel - is a DOM ElementIOExceptionpublic void startElement(QName qName, Attributes attributes) throws IOException
SerializationContextstartElement in class SerializationContextqName - is the name of the elementattributes - are the attributes to writeIOExceptionpublic void endElement()
throws IOException
SerializationContextendElement in class SerializationContextIOExceptionpublic void writeChars(char[] p1,
int p2,
int p3)
throws IOException
SerializationContextwriteChars in class SerializationContextp1 - character array to writep2 - starting index in arrayp3 - length to writeIOExceptionpublic void writeString(String string) throws IOException
SerializationContextwriteString in class SerializationContextstring - is the String to write.IOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.