org.activemath.author.toc
Class JNLPMaker

java.lang.Object
  extended by org.activemath.author.toc.JNLPMaker

public class JNLPMaker
extends Object

A class to prepare a JNLP application-descriptor. The JNLP file is read from the resources, codebase and references are changed, and arguments are added.


Constructor Summary
JNLPMaker(InputStream jnlpInStream, URL codebase, String jnlpHref)
           
 
Method Summary
 void addArgument(String arg)
           
 org.jdom.Document getJNLPDocument()
          Returns the current state of the document that will be serialized if a call to output(java.io.OutputStream) is performed immediately.
 void output(OutputStream outS)
          Inserts the properties then outputs the JNLP document to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNLPMaker

public JNLPMaker(InputStream jnlpInStream,
                 URL codebase,
                 String jnlpHref)
          throws IOException,
                 org.jdom.JDOMException
Parameters:
codebase - The codebase URL which should correspond to the URL that downloaded the produced JNLP file (clients may reload it). All resource jars or jnlp file extensions will be resolved relative to this.
jnlpInStream - The inputstream to the jnlp-file to load as template (note that it should not contain a DTD-reference)
jnlpHref - Missing description of Parameter
Throws:
IOException - If the resource cannot be found.
org.jdom.JDOMException - If parsing the JNLP document raised an error
Method Detail

getJNLPDocument

public org.jdom.Document getJNLPDocument()
Returns the current state of the document that will be serialized if a call to output(java.io.OutputStream) is performed immediately. Do note that properties stored within SubconfigurationMaker are only applied using #insertProperties which is also called before outputting.

Returns:
The document in its current state.

addArgument

public void addArgument(String arg)

output

public void output(OutputStream outS)
            throws IOException
Inserts the properties then outputs the JNLP document to the stream.

Parameters:
outS - The stream to output the document to
Throws:
IOException - If the output to the stream fails