Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache.poi.hdf » extractor » [javadoc | source]
org.apache.poi.hdf.extractor
public class: WordDocument [javadoc | source]
java.lang.Object
   org.apache.poi.hdf.extractor.WordDocument
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
Field Summary
 byte[] _header    byte buffer containing the main Document stream 
 StyleSheet _styleSheet    contains all style information for this document see Word 97 Doc spec 
 ListTables _listTables    contains All list information for this document 
 DOP _docProps    contains global Document properties for this document 
 int _currentList     
 int _tableSize     
 int _sectionCounter     
 FontTable _fonts    fonts available for this document 
 BTreeSet _text    document's text blocks 
 BTreeSet _characterTable    document's character runs 
 BTreeSet _paragraphTable    document's paragraphs 
 BTreeSet _sectionTable    doucment's sections 
 StringBuffer _headerBuffer    used for XSL-FO conversion 
 StringBuffer _bodyBuffer    used for XSL-FO conversion 
 StringBuffer _cellBuffer    used for XSL-FO table conversion 
 ArrayList _cells    used for XSL-FO table conversion 
 ArrayList _table    used for XSL-FO table conversion 
 byte[] _plcfHdd    document's header and footer information 
 int _fcMin    starting position of text in main document stream 
 int _ccpText    length of main document text stream 
 int _ccpFtn    length of footnotes text 
Constructor:
 public WordDocument(String fileName) throws 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:
    IOException - if there is a problem while parsing the document.
 public WordDocument(InputStream inputStream) throws IOException 
Method from org.apache.poi.hdf.extractor.WordDocument Summary:
closeDoc,   main,   openDoc,   writeAllText,   writeSection
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.hdf.extractor.WordDocument Detail:
 public  void closeDoc() 
 public static  void main(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)
 public  void openDoc() 
 public  void writeAllText(Writer out) throws IOException 
    Spits out the document text
 public  void writeSection(int start,
    int end,
    SEP sep,
    BTreeSet text,
    BTreeSet paragraphTable,
    BTreeSet characterTable,
    StyleSheet stylesheet)