Milyn-Smooks Version 0.4

org.milyn.delivery.serialize
Class Serializer

java.lang.Object
  extended byorg.milyn.delivery.serialize.Serializer

public class Serializer
extends java.lang.Object

Node serializer.

This class uses the ContentDeliveryConfig and the SerializationUnit instances defined there on to perform the serialization.

Author:
tfennelly

Constructor Summary
Serializer(org.w3c.dom.Node node, ContainerRequest containerRequest)
          Public constructor.
 
Method Summary
 void serailize(java.io.Writer writer)
          Serialise the document to the supplied output writer instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer(org.w3c.dom.Node node,
                  ContainerRequest containerRequest)
Public constructor.

Parameters:
node - Node to be serialized.
containerRequest - Target device context.
Method Detail

serailize

public void serailize(java.io.Writer writer)
               throws CDRArchiveEntryNotFoundException,
                      java.io.IOException
Serialise the document to the supplied output writer instance.

Adds the DOCTYPE decl if one defined in the Content Delivery Configuration.

If the node is a Document (or DocumentFragment) node the whole node is serialised. Otherwise, only the node child elements are serialised i.e. the node itself is skipped.

Parameters:
writer - Output writer.
Throws:
CDRArchiveEntryNotFoundException - DOM Serialiser exception.
java.io.IOException - Unable to write to output writer.

Milyn-Smooks Version 0.4