org.apache.poi.hdf.extractor
Class WordDocument

java.lang.Object
  extended byorg.apache.poi.hdf.extractor.WordDocument

public class WordDocument
extends java.lang.Object

This class contains the main functionality for the Word file "reader". Much of the code in this class is based on the Word 97 document file format. Only works for non-complex files

Author:
Ryan Ackley

Constructor Summary
WordDocument(java.io.InputStream inputStream)
           
WordDocument(java.lang.String fileName)
          Constructs a Word document from fileName.
 
Method Summary
 void closeDoc()
           
static void main(java.lang.String[] args)
          right now this function takes one parameter: a Word file, and outputs an XSL-FO document at c:\test.xml (this is hardcoded)
 void openDoc()
           
 void writeAllText(java.io.Writer out)
          Spits out the document text
 void writeSection(int start, int end, SEP sep, BTreeSet text, BTreeSet paragraphTable, BTreeSet characterTable, StyleSheet stylesheet)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordDocument

public WordDocument(java.lang.String fileName)
             throws java.io.IOException
Constructs a Word document from fileName. Parses the document and places all the important stuff into data structures.

Parameters:
fileName - The name of the file to read.
Throws:
java.io.IOException - if there is a problem while parsing the document.

WordDocument

public WordDocument(java.io.InputStream inputStream)
             throws java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
right now this function takes one parameter: a Word file, and outputs an XSL-FO document at c:\test.xml (this is hardcoded)


writeAllText

public void writeAllText(java.io.Writer out)
                  throws java.io.IOException
Spits out the document text

Parameters:
out - The Writer to write the text to.
Throws:
java.io.IOException - if there is a problem while reading from the file or writing out the text.

openDoc

public void openDoc()

writeSection

public void writeSection(int start,
                         int end,
                         SEP sep,
                         BTreeSet text,
                         BTreeSet paragraphTable,
                         BTreeSet characterTable,
                         StyleSheet stylesheet)

closeDoc

public void closeDoc()


Copyright © 2003 Apache Software Foundation.