|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.
Field Summary | |
---|---|
protected Bookmarks |
_bookmarks
Holds the bookmarks |
protected BookmarksTables |
_bookmarksTables
Holds the bookmarks tables |
protected ComplexFileTable |
_cft
Contains text of the document wrapped in a obfuscated Word data structure |
protected byte[] |
_dataStream
data stream buffer |
protected DocumentProperties |
_dop
Document wide Properties |
protected Notes |
_endnotes
Holds the footnotes |
protected NotesTables |
_endnotesTables
Holds the ending notes tables |
protected EscherRecordHolder |
_escherRecordHolder
Escher Drawing Group information |
protected Fields |
_fields
Holds the fields |
protected FieldsTables |
_fieldsTables
Holds the fields PLCFs |
protected Notes |
_footnotes
Holds the footnotes |
protected NotesTables |
_footnotesTables
Holds the footnotes tables |
protected ShapesTable |
_officeArts
Deprecated. |
protected OfficeDrawingsImpl |
_officeDrawingsHeaders
Holds Office Art objects |
protected OfficeDrawingsImpl |
_officeDrawingsMain
Holds Office Art objects |
protected PicturesTable |
_pictures
Holds pictures table |
protected RevisionMarkAuthorTable |
_rmat
Holds the revision mark authors for this document. |
protected SavedByTable |
_sbt
Holds the save history for this document. |
protected byte[] |
_tableStream
table stream buffer |
protected java.lang.StringBuilder |
_text
Contains text buffer linked directly to single-piece document text piece |
Fields inherited from class org.apache.poi.hwpf.HWPFDocumentCore |
---|
_cbt, _fib, _ft, _lt, _mainStream, _objectPool, _pbt, _ss, _st, STREAM_OBJECT_POOL, STREAM_WORD_DOCUMENT |
Fields inherited from class org.apache.poi.POIDocument |
---|
directory |
Constructor Summary | |
---|---|
protected |
HWPFDocument()
|
|
HWPFDocument(DirectoryNode directory)
This constructor loads a Word document from a specific point in a POIFSFileSystem, probably not the default. |
|
HWPFDocument(DirectoryNode directory,
POIFSFileSystem pfilesystem)
Deprecated. Use HWPFDocument(DirectoryNode) instead |
|
HWPFDocument(java.io.InputStream istream)
This constructor loads a Word document from an InputStream. |
|
HWPFDocument(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)
|
Bookmarks |
getBookmarks()
|
Range |
getCommentsRange()
Returns the Range which covers all annotations. |
byte[] |
getDataStream()
|
DocumentProperties |
getDocProperties()
|
Range |
getEndnoteRange()
Returns the Range which covers all endnotes. |
Notes |
getEndnotes()
|
EscherRecordHolder |
getEscherRecordHolder()
|
Fields |
getFields()
Returns user-friendly interface to access document Field s |
FieldsTables |
getFieldsTables()
Deprecated. |
Range |
getFootnoteRange()
Returns the Range which covers all the Footnotes. |
Notes |
getFootnotes()
|
Range |
getHeaderStoryRange()
Returns the range which covers all "Header Stories". |
Range |
getMainTextboxRange()
Returns the Range which covers all textboxes. |
OfficeDrawings |
getOfficeDrawingsHeaders()
|
OfficeDrawings |
getOfficeDrawingsMain()
|
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()
Deprecated. use getOfficeDrawingsMain() instead |
byte[] |
getTableStream()
|
java.lang.StringBuilder |
getText()
Internal method to access document text |
TextPieceTable |
getTextTable()
|
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, getDocumentText, getFileInformationBlock, getFontTable, getListTables, getObjectsPool, getParagraphTable, getSectionTable, getStyleSheet, verifyAndBuildPOIFS |
Methods inherited from class org.apache.poi.POIDocument |
---|
createInformationProperties, getDocumentSummaryInformation, getPropertySet, getPropertySet, getSummaryInformation, readProperties, writeProperties, writeProperties, writeProperties, writePropertySet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] _tableStream
protected byte[] _dataStream
protected DocumentProperties _dop
protected ComplexFileTable _cft
protected java.lang.StringBuilder _text
protected SavedByTable _sbt
protected RevisionMarkAuthorTable _rmat
protected EscherRecordHolder _escherRecordHolder
protected PicturesTable _pictures
@Deprecated protected ShapesTable _officeArts
protected OfficeDrawingsImpl _officeDrawingsHeaders
protected OfficeDrawingsImpl _officeDrawingsMain
protected BookmarksTables _bookmarksTables
protected Bookmarks _bookmarks
protected NotesTables _endnotesTables
protected Notes _endnotes
protected NotesTables _footnotesTables
protected Notes _footnotes
protected FieldsTables _fieldsTables
protected Fields _fields
Constructor Detail |
---|
protected HWPFDocument()
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(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.@Deprecated public HWPFDocument(DirectoryNode directory, POIFSFileSystem pfilesystem) throws java.io.IOException
HWPFDocument(DirectoryNode)
instead
pfilesystem
- The POIFSFileSystem that contains the Word document.
java.io.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.public HWPFDocument(DirectoryNode directory) throws java.io.IOException
directory
- The DirectoryNode that contains the Word document.
java.io.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.Method Detail |
---|
@Internal public TextPieceTable getTextTable()
getTextTable
in class HWPFDocumentCore
@Internal public java.lang.StringBuilder getText()
HWPFDocumentCore
getText
in class HWPFDocumentCore
public DocumentProperties getDocProperties()
public Range getOverallRange()
HWPFDocumentCore
getOverallRange
in class HWPFDocumentCore
public Range getRange()
getRange
in class HWPFDocumentCore
public Range getFootnoteRange()
Range
which covers all the Footnotes.
Range
which covers all the Footnotes.public Range getEndnoteRange()
Range
which covers all endnotes.
Range
which covers all endnotes.public Range getCommentsRange()
Range
which covers all annotations.
Range
which covers all annotations.public Range getMainTextboxRange()
Range
which covers all textboxes.
Range
which covers all textboxes.public Range getHeaderStoryRange()
public int characterLength()
@Internal public SavedByTable getSavedByTable()
@Internal public RevisionMarkAuthorTable getRevisionMarkAuthorTable()
public PicturesTable getPicturesTable()
@Internal public EscherRecordHolder getEscherRecordHolder()
@Deprecated @Internal public ShapesTable getShapesTable()
getOfficeDrawingsMain()
instead
public OfficeDrawings getOfficeDrawingsHeaders()
public OfficeDrawings getOfficeDrawingsMain()
public Bookmarks getBookmarks()
public Notes getEndnotes()
public Notes getFootnotes()
@Deprecated @Internal public FieldsTables getFieldsTables()
public Fields getFields()
Field
s
Field
spublic void write(java.io.OutputStream out) throws java.io.IOException
write
in class POIDocument
out
- The OutputStream to write to.
java.io.IOException
- If there is an unexpected IOException from the passed
in OutputStream.@Internal public byte[] getDataStream()
@Internal public byte[] getTableStream()
public int registerList(HWPFList list)
public void delete(int start, int length)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |