org.apache.xalan.processor
Class CompiledStylesheetBundle

java.lang.Object
  |
  +--org.apache.xalan.processor.CompiledStylesheetBundle

public class CompiledStylesheetBundle
extends java.lang.Object

**For advanced use only** Serialize and reload routines for Compiled Stylesheets. Basically, a "bundle" is a zipfile containing the generated and compiled java classes, plus a .ser (ObjectStream) representation of those classes as actually instantiated and connected to represent a top-level Stylesheet. This class provides routines that generate a bundle in a disk file, and that will reread a bundle from such a file.

See Also:
CompilingStylesheetHandler

Constructor Summary
CompiledStylesheetBundle()
          Public constructor.
 
Method Summary
 Templates loadBundle(java.lang.String filename)
          Reload an executable bundle -- a zipfile or jarfile containing the serialized root and the synthesized classes needed to support it, and a main entry point which retrieves these.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompiledStylesheetBundle

public CompiledStylesheetBundle()
Public constructor. The loadBundle() operation requires an actual compiledStylesheetBundle object, for reasons discussed there.
Method Detail

loadBundle

public Templates loadBundle(java.lang.String filename)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
Reload an executable bundle -- a zipfile or jarfile containing the serialized root and the synthesized classes needed to support it, and a main entry point which retrieves these. A custom classloader is used so we can pick these up interactively, along with a customized version of ObjectInputStream that can be told which classloader to consult.

TODO: Open issues in CompiledStylesheetBundle.loadBundle()

Parameters:
String - filename Filesystem name of the bundle file to be loaded.
Returns:
Stylesheet as loaded.
Throws:
java.io.IOException - if there are any problems reading the bundle file
java.lang.ClassNotFoundException - if a class used in serializing the Stylesheet can't be resolved. This could be a glitch in the bundle, but is more likely to be incompatable versions if the Xalan code was changed between when the bundle was created and when it is being reloaded.


Copyright � 2000 Apache XML Project. All Rights Reserved.