org.jboss.identity.federation.core.saml.v2.util
Class DocumentUtil

java.lang.Object
  extended by org.jboss.identity.federation.core.saml.v2.util.DocumentUtil

public class DocumentUtil
extends java.lang.Object

Utility dealing with DOM

Since:
Jan 14, 2009
Author:
Anil.Saldhana@redhat.com

Constructor Summary
DocumentUtil()
           
 
Method Summary
static org.w3c.dom.Document createDocument()
          Create a new document
static org.w3c.dom.Document getDocument(java.io.Reader reader)
          Parse a document from a reader
static org.w3c.dom.Document getDocument(java.lang.String docString)
          Parse a document from the string
static java.lang.String getDocumentAsString(org.w3c.dom.Document signedDoc)
          Marshall a document into a String
static java.lang.String getDOMElementAsString(org.w3c.dom.Element element)
          Marshall a DOM Element as string
static java.io.InputStream getNodeAsStream(org.w3c.dom.Node node)
          Stream a DOM Node as an input stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentUtil

public DocumentUtil()
Method Detail

createDocument

public static org.w3c.dom.Document createDocument()
                                           throws java.lang.Exception
Create a new document

Returns:
Throws:
java.lang.Exception

getDocument

public static org.w3c.dom.Document getDocument(java.lang.String docString)
                                        throws java.lang.Exception
Parse a document from the string

Parameters:
docString -
Returns:
Throws:
java.lang.Exception

getDocument

public static org.w3c.dom.Document getDocument(java.io.Reader reader)
                                        throws java.lang.Exception
Parse a document from a reader

Parameters:
reader -
Returns:
Throws:
java.lang.Exception

getDocumentAsString

public static java.lang.String getDocumentAsString(org.w3c.dom.Document signedDoc)
                                            throws java.lang.Exception
Marshall a document into a String

Parameters:
signedDoc -
Returns:
Throws:
java.lang.Exception

getDOMElementAsString

public static java.lang.String getDOMElementAsString(org.w3c.dom.Element element)
                                              throws java.lang.Exception
Marshall a DOM Element as string

Parameters:
element -
Returns:
Throws:
java.lang.Exception

getNodeAsStream

public static java.io.InputStream getNodeAsStream(org.w3c.dom.Node node)
                                           throws java.lang.Exception
Stream a DOM Node as an input stream

Parameters:
node -
Returns:
Throws:
java.lang.Exception


Copyright © 2009 JBoss Inc.. All Rights Reserved.