net.sf.joott.uno
Class DocumentConverter

java.lang.Object
  extended bynet.sf.joott.uno.DocumentConverter

public class DocumentConverter
extends Object

Performs conversion between supported document formtats.


Constructor Summary
DocumentConverter()
           
DocumentConverter(UnoConnection connection)
           
 
Method Summary
 void convert(URI input, URI output, DocumentFormat outputFormat)
          Converts a document into a different format.
 void setConnection(UnoConnection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentConverter

public DocumentConverter()

DocumentConverter

public DocumentConverter(UnoConnection connection)
Method Detail

setConnection

public void setConnection(UnoConnection connection)

convert

public void convert(URI input,
                    URI output,
                    DocumentFormat outputFormat)
             throws IOException
Converts a document into a different format. Example: converts a Writer document to PDF
 URI sxw = new URI("http://joott.sourceforge.net/test/test.sxw");
 URI pdf = new File("/tmp/test.pdf").toURI();
 DocumentConverter converter = DocumentConverterFactory.getConverter();
 converter.convert(sxw, pdf, DocumentFormat.PDF_WRITER);
 

Parameters:
input - the input document
output - the output document
outputFormat - the output format
Throws:
FileNotFoundException - if the input document is not found
IOException - if the output document is not writable (or the filter name is wrong)