public class DigestGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
md5DigestAlgorithm
String representing the MD5 digest algorithm
|
static String |
sha1DigestAlgorithm
String representing the SHA1 digest algorithm
|
static String |
shaDigestAlgorithm
String representing the SHA digest algorithm
|
static String |
UNICODE_BIG_UNMARKED |
| Constructor and Description |
|---|
DigestGenerator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAttribute(Attr attribute,
Attr comparingAttribute,
String digestAlgorithm)
Compares two Attributes for the XML equality
|
boolean |
compareDocument(Document document,
Document comparingDocument,
String digestAlgorithm)
Compares two Documents for the XML equality
|
boolean |
compareNode(Node node,
Node comparingNode,
String digestAlgorithm)
Compares two Nodes for the XML equality
|
Collection |
getAttributesWithoutNS(Element element)
Gets the collection of attributes which are none namespace declarations for an Element
|
byte[] |
getDigest(Attr attribute,
String digestAlgorithm)
This method is an overloaded method for the digest generation for Attr
|
byte[] |
getDigest(Document document,
String digestAlgorithm)
This method is an overloaded method for the digest generation for Document
|
byte[] |
getDigest(Element element,
String digestAlgorithm)
This method is an overloaded method for the digest generation for Element
|
byte[] |
getDigest(Node node,
String digestAlgorithm)
This method is an overloaded method for the digest generation for Node
|
byte[] |
getDigest(ProcessingInstruction pi,
String digestAlgorithm)
This method is an overloaded method for the digest generation for ProcessingInstruction
|
byte[] |
getDigest(Text text,
String digestAlgorithm)
This method is an overloaded method for the digest generation for Text
|
String |
getExpandedName(Attr attribute)
This method is an overloaded method for getting the expanded name namespaceURI followed by the local name for
Attr
|
String |
getExpandedName(Element element)
This method is an overloaded method for getting the expanded name namespaceURI followed by the local name for
Element
|
String |
getStringRepresentation(byte[] array)
Gets the String representation of the byte array
|
Collection |
getValidElements(Document document)
Gets the valid element collection of an Document.
|
public static final String UNICODE_BIG_UNMARKED
public static final String md5DigestAlgorithm
public static final String shaDigestAlgorithm
public static final String sha1DigestAlgorithm
public byte[] getDigest(Document document, String digestAlgorithm) throws Exception
document - digestAlgorithm - Exceptionpublic byte[] getDigest(Node node, String digestAlgorithm) throws Exception
node - digestAlgorithm - Exceptionpublic byte[] getDigest(Element element, String digestAlgorithm) throws Exception
element - digestAlgorithm - Exceptionpublic byte[] getDigest(ProcessingInstruction pi, String digestAlgorithm) throws Exception
pi - digestAlgorithm - Exceptionpublic byte[] getDigest(Attr attribute, String digestAlgorithm) throws Exception
attribute - digestAlgorithm - Exceptionpublic byte[] getDigest(Text text, String digestAlgorithm) throws Exception
text - digestAlgorithm - Exceptionpublic String getExpandedName(Element element)
element - public String getExpandedName(Attr attribute)
attribute - public Collection getAttributesWithoutNS(Element element)
element - public Collection getValidElements(Document document)
document - public String getStringRepresentation(byte[] array)
array - public boolean compareNode(Node node, Node comparingNode, String digestAlgorithm) throws Exception
node - comparingNode - digestAlgorithm - Exceptionpublic boolean compareDocument(Document document, Document comparingDocument, String digestAlgorithm) throws Exception
document - comparingDocument - digestAlgorithm - Exceptionpublic boolean compareAttribute(Attr attribute, Attr comparingAttribute, String digestAlgorithm) throws Exception
attribute - comparingAttribute - digestAlgorithm - ExceptionCopyright © 2004-2012 CodeLutin. All Rights Reserved.