|
||||||||||
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.
Field Summary | |
---|---|
protected ComplexFileTable |
_cft
Contains text of the document wrapped in a obfuscated Word data structure |
protected CPSplitCalculator |
_cpSplit
And for making sense of CP lengths in the FIB |
protected byte[] |
_dataStream
data stream buffer |
protected EscherRecordHolder |
_dgg
Escher Drawing Group information |
protected DocumentProperties |
_dop
Document wide Properties |
protected FieldsTables |
_fieldsTables
Holds the fields PLCFs |
protected FSPATable |
_fspa
Holds FSBA (shape) information |
protected ShapesTable |
_officeArts
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 TextPieceTable |
_tpt
|
Fields inherited from class org.apache.poi.hwpf.HWPFDocumentCore |
---|
_cbt, _fib, _ft, _lt, _mainStream, _pbt, _ss, _st |
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)
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(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. |
FieldsTables |
getFieldsTables()
|
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 |
---|
copyNodes, createInformationProperties, getDocumentSummaryInformation, getPropertySet, getSummaryInformation, readProperties, writeProperties, writeProperties, writePropertySet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CPSplitCalculator _cpSplit
protected byte[] _tableStream
protected byte[] _dataStream
protected DocumentProperties _dop
protected ComplexFileTable _cft
protected TextPieceTable _tpt
protected SavedByTable _sbt
protected RevisionMarkAuthorTable _rmat
protected PicturesTable _pictures
protected FSPATable _fspa
protected EscherRecordHolder _dgg
protected ShapesTable _officeArts
protected FieldsTables _fieldsTables
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.public HWPFDocument(DirectoryNode directory, 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(DirectoryNode directory) 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 FieldsTables getFieldsTables()
public 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.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 |