Package org.keycloak.saml.common.util
Class StaxUtil
- java.lang.Object
- 
- org.keycloak.saml.common.util.StaxUtil
 
- 
 public class StaxUtil extends Object Utility class that deals with StAX- Since:
- Oct 19, 2010
- Author:
- Anil.Saldhana@redhat.com
 
- 
- 
Constructor SummaryConstructors Constructor Description StaxUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidflush(XMLStreamWriter writer)Flush the stream writerstatic XMLEventWritergetXMLEventWriter(OutputStream outStream)Get anXMLEventWriterstatic XMLStreamWritergetXMLStreamWriter(OutputStream outStream)Get anXMLStreamWriterstatic XMLStreamWritergetXMLStreamWriter(Writer writer)Get anXMLStreamWriterstatic XMLStreamWritergetXMLStreamWriter(Result result)static voidsetPrefix(XMLStreamWriter writer, String prefix, String nsURI)Set a prefixstatic voidwriteAttribute(XMLStreamWriter writer, String localName, String value)Write an xml attributestatic voidwriteAttribute(XMLStreamWriter writer, String localName, String type, String value)Write an xml attributestatic voidwriteAttribute(XMLStreamWriter writer, String prefix, String localName, String type, String value)Write an xml attributestatic voidwriteAttribute(XMLStreamWriter writer, String attributeName, QName attributeValue)Write an attributestatic voidwriteAttribute(XMLStreamWriter writer, QName attributeName, String attributeValue)Write an attributestatic voidwriteCData(XMLStreamWriter writer, String value)Write a string as text nodestatic voidwriteCharacters(XMLStreamWriter writer, String value)Write a string as text nodestatic voidwriteDefaultNameSpace(XMLStreamWriter writer, String ns)Write the default namespacestatic voidwriteDOMElement(XMLStreamWriter writer, Element domElement)Write DOM Element to the streamstatic voidwriteDOMNode(XMLStreamWriter writer, Node node)Write a DOM Node to the streamstatic voidwriteEndElement(XMLStreamWriter writer)Write an end element.static voidwriteNameSpace(XMLStreamWriter writer, String prefix, String ns)Write a namespacestatic voidwriteStartElement(XMLStreamWriter writer, String prefix, String localPart, String ns)Write a start element
 
- 
- 
- 
Method Detail- 
flushpublic static void flush(XMLStreamWriter writer) throws ProcessingException Flush the stream writer- Parameters:
- writer-
- Throws:
- ProcessingException
 
 - 
getXMLEventWriterpublic static XMLEventWriter getXMLEventWriter(OutputStream outStream) throws ProcessingException Get anXMLEventWriter- Parameters:
- outStream-
- Returns:
- Throws:
- ProcessingException
 
 - 
getXMLStreamWriterpublic static XMLStreamWriter getXMLStreamWriter(OutputStream outStream) throws ProcessingException Get anXMLStreamWriter- Parameters:
- outStream-
- Returns:
- Throws:
- ProcessingException
 
 - 
getXMLStreamWriterpublic static XMLStreamWriter getXMLStreamWriter(Writer writer) throws ProcessingException Get anXMLStreamWriter- Parameters:
- writer-- Writer
- Returns:
- Throws:
- ProcessingException
 
 - 
getXMLStreamWriterpublic static XMLStreamWriter getXMLStreamWriter(Result result) throws ProcessingException - Throws:
- ProcessingException
 
 - 
setPrefixpublic static void setPrefix(XMLStreamWriter writer, String prefix, String nsURI) throws ProcessingException Set a prefix- Parameters:
- writer-
- prefix-
- nsURI-
- Throws:
- ProcessingException
 
 - 
writeAttributepublic static void writeAttribute(XMLStreamWriter writer, String attributeName, QName attributeValue) throws ProcessingException Write an attribute- Parameters:
- writer-
- attributeName- QName of the attribute
- attributeValue-
- Throws:
- ProcessingException
 
 - 
writeAttributepublic static void writeAttribute(XMLStreamWriter writer, QName attributeName, String attributeValue) throws ProcessingException Write an attribute- Parameters:
- writer-
- attributeName- QName of the attribute
- attributeValue-
- Throws:
- ProcessingException
 
 - 
writeAttributepublic static void writeAttribute(XMLStreamWriter writer, String localName, String value) throws ProcessingException Write an xml attribute- Parameters:
- writer-
- localName- localpart
- value- value of the attribute
- Throws:
- ProcessingException
 
 - 
writeAttributepublic static void writeAttribute(XMLStreamWriter writer, String localName, String type, String value) throws ProcessingException Write an xml attribute- Parameters:
- writer-
- localName- localpart
- type- typically xsi:type
- value- value of the attribute
- Throws:
- ProcessingException
 
 - 
writeAttributepublic static void writeAttribute(XMLStreamWriter writer, String prefix, String localName, String type, String value) throws ProcessingException Write an xml attribute- Parameters:
- writer-
- prefix- prefix for the attribute
- localName- localpart
- type- typically xsi:type
- value- value of the attribute
- Throws:
- ProcessingException
 
 - 
writeCharacterspublic static void writeCharacters(XMLStreamWriter writer, String value) throws ProcessingException Write a string as text node- Parameters:
- writer-
- value-
- Throws:
- ProcessingException
 
 - 
writeCDatapublic static void writeCData(XMLStreamWriter writer, String value) throws ProcessingException Write a string as text node- Parameters:
- writer-
- value-
- Throws:
- ProcessingException
 
 - 
writeDefaultNameSpacepublic static void writeDefaultNameSpace(XMLStreamWriter writer, String ns) throws ProcessingException Write the default namespace- Parameters:
- writer-
- ns-
- Throws:
- ProcessingException
 
 - 
writeDOMNodepublic static void writeDOMNode(XMLStreamWriter writer, Node node) throws ProcessingException Write a DOM Node to the stream- Parameters:
- writer-
- node-
- Throws:
- ProcessingException
 
 - 
writeDOMElementpublic static void writeDOMElement(XMLStreamWriter writer, Element domElement) throws ProcessingException Write DOM Element to the stream- Parameters:
- writer-
- domElement-
- Throws:
- ProcessingException
 
 - 
writeNameSpacepublic static void writeNameSpace(XMLStreamWriter writer, String prefix, String ns) throws ProcessingException Write a namespace- Parameters:
- writer-
- prefix- prefix
- ns- Namespace URI
- Throws:
- ProcessingException
 
 - 
writeStartElementpublic static void writeStartElement(XMLStreamWriter writer, String prefix, String localPart, String ns) throws ProcessingException Write a start element- Parameters:
- writer-
- prefix-
- localPart-
- ns-
- Throws:
- ProcessingException
 
 - 
writeEndElementpublic static void writeEndElement(XMLStreamWriter writer) throws ProcessingException Write an end element. The stream writer keeps track of which start element needs to be closed with an end tag. - Parameters:
- writer-
- Throws:
- ProcessingException
 
 
- 
 
-