Reading word file and saving it as odt
<p>I have downloaded ODFToolkit, and I don't have to setup OpenOffice.</p>

<p>I can create odt file as following.</p>

<p>And my question is:</p>

<p>May I read .doc and .docx files and save them as .odt ?</p>

<p>Could you help me please?</p>

<p>Here is the code:</p>

<pre><code>import org.odftoolkit.odfdom.doc.OdfTextDocument;

import java.net.URI;


public class QuickOdt {

public static void main(String[] args) {
    OdfTextDocument outputDocument;

    try
    {
        outputDocument =
            OdfTextDocument.newTextDocument();
        outputDocument.addText("I'm using the ODFDOM toolkit!");

        outputDocument.newParagraph();
        outputDocument.newImage(new URI("images/odf-community.jpg"));

        outputDocument.newParagraph("Bu bir taze paragrafdyr");

        outputDocument.save("quick.odt");

    }
    catch (Exception e)
    {
        System.err.println("Unable to create output file.");
        System.err.println(e.getMessage());
    }
}
}
</code></pre>
