com.ibm.xml.sax
Class DigestFilter

java.lang.Object
  |
  +--com.ibm.xml.sax.DigestFilter

public class DigestFilter
extends java.lang.Object
implements NamespaceDocumentHandler


Field Summary
protected  java.io.CharArrayWriter charBuffer
           
protected  java.util.Stack elementStack
           
protected  boolean enable
           
protected  java.security.MessageDigest messageDigest
           
protected  NamespaceDocumentHandler next
           
protected  byte[] result
           
 
Constructor Summary
DigestFilter()
          Creates a DigestFilter instance.
DigestFilter(java.security.MessageDigest md)
          Creates a DigestFilter instance in `enable' mode.
DigestFilter(NamespaceDocumentHandler next)
          Creates a DigestFilter instance.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Applications must not call this method.
 void enable(java.security.MessageDigest md)
          Starts digest calculation.
 void endDocument()
          Applications must not call this method.
 void endElement(java.lang.String namespace, java.lang.String prefix, java.lang.String localPart, java.lang.String qname)
          Applications must not call this method.
 byte[] getDigest()
          Returns a digest value.
static void heapSort(java.lang.String[] pd, int length)
          Sort String array.
 void ignorableWhitespace(char[] ch, int start, int length)
          Applications must not call this method.
static void printByteArray(byte[] ab)
           
static void printByteArray(java.io.Writer wr, byte[] ab)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
          Applications must not call this method.
 void setDocumentLocator(Locator locator)
          Applications must not call this method.
 void setNextDocumentHandler(NamespaceDocumentHandler handler)
           
 void startDocument()
          Applications must not call this method.
 void startElement(java.lang.String namespace, java.lang.String prefix, java.lang.String localPart, java.lang.String qname, NamespaceAttributeList atts)
          Applications must not call this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

charBuffer

protected java.io.CharArrayWriter charBuffer

messageDigest

protected java.security.MessageDigest messageDigest

elementStack

protected java.util.Stack elementStack

result

protected byte[] result

next

protected NamespaceDocumentHandler next

enable

protected boolean enable
Constructor Detail

DigestFilter

public DigestFilter()
Creates a DigestFilter instance.

DigestFilter

public DigestFilter(NamespaceDocumentHandler next)
Creates a DigestFilter instance.

DigestFilter

public DigestFilter(java.security.MessageDigest md)
Creates a DigestFilter instance in `enable' mode.
Method Detail

enable

public void enable(java.security.MessageDigest md)
Starts digest calculation.

getDigest

public byte[] getDigest()
Returns a digest value.

setNextDocumentHandler

public void setNextDocumentHandler(NamespaceDocumentHandler handler)

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String prefix,
                         java.lang.String localPart,
                         java.lang.String qname,
                         NamespaceAttributeList atts)
                  throws SAXException
Applications must not call this method.
Specified by:
startElement in interface NamespaceDocumentHandler

endElement

public void endElement(java.lang.String namespace,
                       java.lang.String prefix,
                       java.lang.String localPart,
                       java.lang.String qname)
                throws SAXException
Applications must not call this method.
Specified by:
endElement in interface NamespaceDocumentHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Applications must not call this method.
Specified by:
characters in interface NamespaceDocumentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Applications must not call this method.
Specified by:
ignorableWhitespace in interface NamespaceDocumentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws SAXException
Applications must not call this method.
Specified by:
processingInstruction in interface NamespaceDocumentHandler

setDocumentLocator

public void setDocumentLocator(Locator locator)
Applications must not call this method.
Specified by:
setDocumentLocator in interface NamespaceDocumentHandler

startDocument

public void startDocument()
                   throws SAXException
Applications must not call this method.
Specified by:
startDocument in interface NamespaceDocumentHandler

endDocument

public void endDocument()
                 throws SAXException
Applications must not call this method.
Specified by:
endDocument in interface NamespaceDocumentHandler

heapSort

public static void heapSort(java.lang.String[] pd,
                            int length)
Sort String array.

printByteArray

public static void printByteArray(byte[] ab)
                           throws java.io.IOException

printByteArray

public static void printByteArray(java.io.Writer wr,
                                  byte[] ab)
                           throws java.io.IOException