nu.xom.canonical

Class Canonicalizer

Object
  extended bynu.xom.canonical.Canonicalizer

public class Canonicalizer
extends Object

Writes XML in the format specified by Canonical XML Version 1.0.

Only complete documents can be canonicalized. Document subset canonicalization is not yet supported.

Version:
1.0
Author:
Elliotte Rusty Harold

Constructor Summary
Canonicalizer(OutputStream out)

           Creates a Canonicalizer that outputs a canonical XML document with comments.
Canonicalizer(OutputStream out, boolean withComments)

           Creates a Canonicalizer that outputs a canonical XML document with or without comments.
 
Method Summary
 voidwrite(Document doc)

           Serializes a document onto the output stream using the canonical XML algorithm.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Canonicalizer

public Canonicalizer(OutputStream out)

Creates a Canonicalizer that outputs a canonical XML document with comments.

Parameters:
out - the output stream the document is written onto

Canonicalizer

public Canonicalizer(OutputStream out,
                     boolean withComments)

Creates a Canonicalizer that outputs a canonical XML document with or without comments.

Parameters:
out - the output stream the document is written onto
withComments - true if comments should be included in the output, false otherwise
Method Detail

write

public final void write(Document doc)
                 throws IOException

Serializes a document onto the output stream using the canonical XML algorithm.

Parameters:
doc - the document to serialize
Throws:
IOException - if the underlying OutputStream encounters an I/O error


Copyright 2002-2005 Elliotte Rusty Harold

elharo@metalab.unc.edu