public final class HWPFDocument extends HWPFDocumentCore
Modifier and Type | Field and Description |
---|---|
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 StringBuilder |
_text
Contains text buffer linked directly to single-piece document text piece
|
_cbt, _fib, _ft, _lt, _mainStream, _objectPool, _pbt, _ss, _st, STREAM_OBJECT_POOL, STREAM_WORD_DOCUMENT
directory
Modifier | Constructor and Description |
---|---|
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(InputStream istream)
This constructor loads a Word document from an InputStream.
|
|
HWPFDocument(POIFSFileSystem pfilesystem)
This constructor loads a Word document from a POIFSFileSystem
|
Modifier and Type | Method and Description |
---|---|
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() |
StringBuilder |
getText()
Internal method to access document text
|
TextPieceTable |
getTextTable() |
int |
registerList(HWPFList list) |
void |
write(OutputStream out)
Writes out the word file that is represented by an instance of this class.
|
getCharacterTable, getDocumentText, getFileInformationBlock, getFontTable, getListTables, getObjectsPool, getParagraphTable, getSectionTable, getStyleSheet, verifyAndBuildPOIFS
copyNodeRecursively, copyNodes, copyNodes, createInformationProperties, getDocumentSummaryInformation, getPropertySet, getSummaryInformation, readProperties, writeProperties, writeProperties, writePropertySet
protected byte[] _tableStream
protected byte[] _dataStream
protected DocumentProperties _dop
protected ComplexFileTable _cft
protected 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
protected HWPFDocument()
public HWPFDocument(InputStream istream) throws IOException
istream
- The InputStream that contains the Word document.IOException
- If there is an unexpected IOException from the passed
in InputStream.public HWPFDocument(POIFSFileSystem pfilesystem) throws IOException
pfilesystem
- The POIFSFileSystem that contains the Word document.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.@Deprecated public HWPFDocument(DirectoryNode directory, POIFSFileSystem pfilesystem) throws IOException
HWPFDocument(DirectoryNode)
insteadpfilesystem
- The POIFSFileSystem that contains the Word document.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.public HWPFDocument(DirectoryNode directory) throws IOException
directory
- The DirectoryNode that contains the Word document.IOException
- If there is an unexpected IOException from the passed
in POIFSFileSystem.@Internal public TextPieceTable getTextTable()
getTextTable
in class HWPFDocumentCore
@Internal public 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()
insteadpublic OfficeDrawings getOfficeDrawingsHeaders()
public OfficeDrawings getOfficeDrawingsMain()
public Bookmarks getBookmarks()
public Notes getEndnotes()
public Notes getFootnotes()
@Deprecated @Internal public FieldsTables getFieldsTables()
public Fields getFields()
Field
sField
spublic void write(OutputStream out) throws IOException
write
in class POIDocument
out
- The OutputStream to write to.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)
Copyright © 2020. All rights reserved.