|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.POIDocument
org.apache.poi.hwpf.HWPFDocumentCore
org.apache.poi.hwpf.HWPFDocument
public final class HWPFDocument
This class acts as the bucket that we throw all of the Word data structures into.
Constructor Summary | |
---|---|
HWPFDocument(org.apache.poi.poifs.filesystem.DirectoryNode directory,
org.apache.poi.poifs.filesystem.POIFSFileSystem pfilesystem)
This constructor loads a Word document from a specific point in a POIFSFileSystem, probably not the default. |
|
HWPFDocument(java.io.InputStream istream)
This constructor loads a Word document from an InputStream. |
|
HWPFDocument(org.apache.poi.poifs.filesystem.POIFSFileSystem pfilesystem)
This constructor loads a Word document from a POIFSFileSystem |
Method Summary | |
---|---|
int |
characterLength()
Returns the character length of a document. |
void |
delete(int start,
int length)
|
Range |
getCommentsRange()
Returns the range which covers all the Endnotes. |
CPSplitCalculator |
getCPSplitCalculator()
|
byte[] |
getDataStream()
|
DocumentProperties |
getDocProperties()
|
Range |
getEndnoteRange()
Returns the range which covers all the Endnotes. |
Range |
getFootnoteRange()
Returns the range which covers all the Footnotes. |
Range |
getHeaderStoryRange()
Returns the range which covers all "Header Stories". |
Range |
getOverallRange()
Returns the range that covers all text in the file, including main text, footnotes, headers and comments |
PicturesTable |
getPicturesTable()
|
Range |
getRange()
Returns the range which covers the whole of the document, but excludes any headers and footers. |
RevisionMarkAuthorTable |
getRevisionMarkAuthorTable()
Gets a reference to the revision mark author table, which holds the revision mark authors for the document. |
SavedByTable |
getSavedByTable()
Gets a reference to the saved -by table, which holds the save history for the document. |
ShapesTable |
getShapesTable()
|
byte[] |
getTableStream()
|
TextPieceTable |
getTextTable()
|
static void |
main(java.lang.String[] args)
Takes two arguments, 1) name of the Word file to read in 2) location to write it out at. |
int |
registerList(HWPFList list)
|
void |
write(java.io.OutputStream out)
Writes out the word file that is represented by an instance of this class. |
Methods inherited from class org.apache.poi.hwpf.HWPFDocumentCore |
---|
getCharacterTable, getFileInformationBlock, getFontTable, getListTables, getParagraphTable, getSectionTable, getStyleSheet, verifyAndBuildPOIFS |
Methods inherited from class org.apache.poi.POIDocument |
---|
createInformationProperties, getDocumentSummaryInformation, getSummaryInformation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HWPFDocument(java.io.InputStream istream) throws java.io.IOException
istream
- The InputStream that contains the Word document.
java.io.IOException
- If there is an unexpected IOException from the passed
in InputStream.public HWPFDocument(org.apache.poi.poifs.filesystem.POIFSFileSystem pfilesystem) throws java.io.IOException
pfilesystem
- The POIFSFileSystem that contains the Word document.
java.io.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.public HWPFDocument(org.apache.poi.poifs.filesystem.DirectoryNode directory, org.apache.poi.poifs.filesystem.POIFSFileSystem pfilesystem) throws java.io.IOException
pfilesystem
- The POIFSFileSystem that contains the Word document.
java.io.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.Method Detail |
---|
public TextPieceTable getTextTable()
getTextTable
in class HWPFDocumentCore
public CPSplitCalculator getCPSplitCalculator()
public DocumentProperties getDocProperties()
public Range getOverallRange()
public Range getRange()
getRange
in class HWPFDocumentCore
public Range getFootnoteRange()
public Range getEndnoteRange()
public Range getCommentsRange()
public Range getHeaderStoryRange()
public int characterLength()
public SavedByTable getSavedByTable()
public RevisionMarkAuthorTable getRevisionMarkAuthorTable()
public PicturesTable getPicturesTable()
public ShapesTable getShapesTable()
public void write(java.io.OutputStream out) throws java.io.IOException
write
in class org.apache.poi.POIDocument
out
- The OutputStream to write to.
java.io.IOException
- If there is an unexpected IOException from the passed
in OutputStream.public byte[] getDataStream()
public byte[] getTableStream()
public int registerList(HWPFList list)
public void delete(int start, int length)
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |