Package eu.europa.esig.dss.xml.utils
Class DOMDocument
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.xml.utils.DOMDocument
- All Implemented Interfaces:
DSSDocument,Serializable
This class allows handling of an
org.w3c.dom.Node as a eu.europa.esig.dss.model.DSSDocument.
The class handles the Node in memory, and reads its data only on request.
This class uses a eu.europa.esig.dss.model.InMemoryDocument for internal processing of
the cached org.w3c.dom.Node's content.- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.model.CommonDocument
digestMap, mimeType, name -
Constructor Summary
ConstructorsConstructorDescriptionDOMDocument(Node node) Default constructor to create aDOMDocumentfrom anorg.w3c.dom.Element.DOMDocument(Node node, String name) Constructor to create aDOMDocumentwith name provided. -
Method Summary
Methods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, getDigestValue, getMimeType, getName, save, setMimeType, setName, toString, writeTo
-
Constructor Details
-
DOMDocument
Default constructor to create aDOMDocumentfrom anorg.w3c.dom.Element. NOTE: Uses aMimeTypeEnum.XMLMimeType by default.- Parameters:
node-Nodeto create a document from
-
DOMDocument
Constructor to create aDOMDocumentwith name provided. NOTE: Uses aMimeTypeEnum.XMLMimeType by default.
-
-
Method Details
-
getNode
Gets the Node used to define the document- Returns:
Node
-
openStream
Description copied from interface:DSSDocumentOpens aInputStreamon theDSSDocumentcontents. The type of theInputStreamdepends on the type of theDSSDocument.- Returns:
- an
InputStream
-
getBytes
protected byte[] getBytes()Gets cached binary array as the result of the Element serialization- Returns:
- byte array
-
equals
- Overrides:
equalsin classCommonDocument
-
hashCode
public int hashCode()- Overrides:
hashCodein classCommonDocument
-