Package org.apache.poi.hwpf.model
Class FileInformationBlock
java.lang.Object
org.apache.poi.hwpf.model.FileInformationBlock
The File Information Block (FIB). Holds pointers to various bits of the file, and lots of flags which specify properties of the document.
- The
FibBaseclass, holds the first 32 bytes. - The next part, the fibRgW / FibRgW97, is handled by the
FibRgW97. - The next part, the fibRgLw / FibRgLw97, is handled by the
FibRgLw97. - Finally, the rest of the fields are handled by the
FIBFieldHandler.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileInformationBlock(byte[] mainDocument) Creates a new instance of FileInformationBlock -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfillVariableFields(byte[] mainDocument, byte[] tableStream) intgetCbMac()How many bytes of the main stream contain real data.intgetFcClx()intintgetFcDop()intintintintintDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intintDeprecated.intAn unsigned integer that specifies an offset in the Table Stream.intAn unsigned integer that specifies an offset in the Table Stream.intintintintintintintintintintintintintintintintintDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.intintDeprecated.intintintintintintintintintintgetNFib()intgetNotesDescriptorsOffset(NoteType noteType) intgetNotesDescriptorsSize(NoteType noteType) intgetNotesTextPositionsOffset(NoteType noteType) intgetNotesTextPositionsSize(NoteType noteType) intReturn the offset to the PlcfHdd, in the table stream, i.e.intReturn the size of the PlcfHdd, in the table stream, i.e.intgetSize()intvoidsetCbMac(int cbMac) Updates the count of the number of bytes in the main stream which contain real datavoidsetFcClx(int fcClx) voidsetFcDop(int fcDop) voidsetFcPlcfbkf(int offset) voidsetFcPlcfbkl(int offset) voidsetFcPlcfbteChpx(int fcPlcfBteChpx) voidsetFcPlcfbtePapx(int fcPlcfBtePapx) voidsetFcPlcffldAtn(int offset) Deprecated.voidsetFcPlcffldEdn(int offset) Deprecated.voidsetFcPlcffldFtn(int offset) Deprecated.voidsetFcPlcffldHdr(int offset) Deprecated.voidsetFcPlcffldHdrtxbx(int offset) Deprecated.voidsetFcPlcffldMom(int offset) Deprecated.voidsetFcPlcffldTxbx(int offset) Deprecated.voidsetFcPlcfLst(int fcPlcfLst) Deprecated.voidsetFcPlcfsed(int fcPlcfSed) voidsetFcPlfLfo(int fcPlfLfo) voidsetFcPlfLst(int fcPlfLst) voidsetFcStshf(int fcStshf) voidsetFcSttbfbkmk(int offset) voidsetFcSttbfffn(int fcSttbFffn) voidsetFcSttbfRMark(int fcSttbfRMark) voidsetFcSttbSavedBy(int fcSttbSavedBy) voidsetFieldsPlcfLength(FieldsDocumentPart part, int length) voidsetFieldsPlcfOffset(FieldsDocumentPart part, int offset) voidsetFSPAPlcfLength(FSPADocumentPart part, int length) voidsetFSPAPlcfOffset(FSPADocumentPart part, int offset) voidsetLcbClx(int lcbClx) voidsetLcbDop(int lcbDop) voidsetLcbPlcfbkf(int length) voidsetLcbPlcfbkl(int length) voidsetLcbPlcfbteChpx(int lcbPlcfBteChpx) voidsetLcbPlcfbtePapx(int lcbPlcfBtePapx) voidsetLcbPlcffldAtn(int size) Deprecated.voidsetLcbPlcffldEdn(int size) Deprecated.voidsetLcbPlcffldFtn(int size) Deprecated.voidsetLcbPlcffldHdr(int size) Deprecated.voidsetLcbPlcffldHdrtxbx(int size) Deprecated.voidsetLcbPlcffldMom(int size) Deprecated.voidsetLcbPlcffldTxbx(int size) Deprecated.voidsetLcbPlcfLst(int lcbPlcfLst) Deprecated.voidsetLcbPlcfsed(int lcbPlcfSed) voidsetLcbPlfLfo(int lcbPlfLfo) voidsetLcbPlfLst(int lcbPlfLst) voidsetLcbStshf(int lcbStshf) voidsetLcbSttbfbkmk(int length) voidsetLcbSttbfffn(int lcbSttbFffn) voidsetLcbSttbfRMark(int lcbSttbfRMark) voidsetLcbSttbSavedBy(int fcSttbSavedBy) voidsetModifiedHigh(int modifiedHigh) voidsetModifiedLow(int modifiedLow) voidsetNotesDescriptorsOffset(NoteType noteType, int offset) voidsetNotesDescriptorsSize(NoteType noteType, int offset) voidsetNotesTextPositionsOffset(NoteType noteType, int offset) voidsetNotesTextPositionsSize(NoteType noteType, int offset) voidsetPlcfHddOffset(int fcPlcfHdd) voidsetPlcfHddSize(int lcbPlcfHdd) voidsetSubdocumentTextStreamLength(SubdocumentType type, int length) toString()voidwriteTo(byte[] mainStream, ByteArrayOutputStream tableStream)
-
Field Details
-
logger
-
-
Constructor Details
-
FileInformationBlock
public FileInformationBlock(byte[] mainDocument) Creates a new instance of FileInformationBlock
-
-
Method Details
-
fillVariableFields
public void fillVariableFields(byte[] mainDocument, byte[] tableStream) -
toString
-
getNFib
public int getNFib() -
getFcDop
public int getFcDop() -
setFcDop
public void setFcDop(int fcDop) -
getLcbDop
public int getLcbDop() -
setLcbDop
public void setLcbDop(int lcbDop) -
getFcStshf
public int getFcStshf() -
getLcbStshf
public int getLcbStshf() -
setFcStshf
public void setFcStshf(int fcStshf) -
setLcbStshf
public void setLcbStshf(int lcbStshf) -
getFcClx
public int getFcClx() -
getLcbClx
public int getLcbClx() -
setFcClx
public void setFcClx(int fcClx) -
setLcbClx
public void setLcbClx(int lcbClx) -
getFcPlcfbteChpx
public int getFcPlcfbteChpx() -
getLcbPlcfbteChpx
public int getLcbPlcfbteChpx() -
setFcPlcfbteChpx
public void setFcPlcfbteChpx(int fcPlcfBteChpx) -
setLcbPlcfbteChpx
public void setLcbPlcfbteChpx(int lcbPlcfBteChpx) -
getFcPlcfbtePapx
public int getFcPlcfbtePapx() -
getLcbPlcfbtePapx
public int getLcbPlcfbtePapx() -
setFcPlcfbtePapx
public void setFcPlcfbtePapx(int fcPlcfBtePapx) -
setLcbPlcfbtePapx
public void setLcbPlcfbtePapx(int lcbPlcfBtePapx) -
getFcPlcfsed
public int getFcPlcfsed() -
getLcbPlcfsed
public int getLcbPlcfsed() -
setFcPlcfsed
public void setFcPlcfsed(int fcPlcfSed) -
setLcbPlcfsed
public void setLcbPlcfsed(int lcbPlcfSed) -
getFcPlcfLst
Deprecated. -
getFcPlfLst
public int getFcPlfLst()An unsigned integer that specifies an offset in the Table Stream. A PlfLst that contains list formatting information begins at this offset. An array of LVLs is appended to the PlfLst. lcbPlfLst does not account for the array of LVLs. The size of the array of LVLs is specified by the LSTFs in PlfLst. For each LSTF whose fSimpleList is set to 0x1, there is one LVL in the array of LVLs that specifies the level formatting of the single level in the list which corresponds to the LSTF. And, for each LSTF whose fSimpleList is set to 0x0, there are 9 LVLs in the array of LVLs that specify the level formatting of the respective levels in the list which corresponds to the LSTF. This array of LVLs is in the same respective order as the LSTFs in PlfLst. If lcbPlfLst is 0, fcPlfLst is undefined and MUST be ignored.Quote from "[MS-DOC] -- v20110315, Word (.doc) Binary File Format; page 76 / 621"
-
getLcbPlcfLst
Deprecated. -
getLcbPlfLst
public int getLcbPlfLst() -
setFcPlcfLst
Deprecated. -
setFcPlfLst
public void setFcPlfLst(int fcPlfLst) -
setLcbPlcfLst
Deprecated. -
setLcbPlfLst
public void setLcbPlfLst(int lcbPlfLst) -
getFcPlfLfo
public int getFcPlfLfo()An unsigned integer that specifies an offset in the Table Stream. A PlfLfo that contains list formatting override information begins at this offset. If lcbPlfLfo is zero, fcPlfLfo is undefined and MUST be ignored.Quote from "[MS-DOC] -- v20110315, Word (.doc) Binary File Format; page 76 / 621"
-
getLcbPlfLfo
public int getLcbPlfLfo() -
getFcSttbfbkmk
public int getFcSttbfbkmk()- Returns:
- Offset in table stream of the STTBF that records bookmark names in the main document
-
setFcSttbfbkmk
public void setFcSttbfbkmk(int offset) -
getLcbSttbfbkmk
public int getLcbSttbfbkmk()- Returns:
- Count of bytes in Sttbfbkmk
-
setLcbSttbfbkmk
public void setLcbSttbfbkmk(int length) -
getFcPlcfbkf
public int getFcPlcfbkf()- Returns:
- Offset in table stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF structure definition.
-
setFcPlcfbkf
public void setFcPlcfbkf(int offset) -
getLcbPlcfbkf
public int getLcbPlcfbkf()- Returns:
- Count of bytes in Plcfbkf
-
setLcbPlcfbkf
public void setLcbPlcfbkf(int length) -
getFcPlcfbkl
public int getFcPlcfbkl()- Returns:
- Offset in table stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. No structure is stored in this PLCF.
-
setFcPlcfbkl
public void setFcPlcfbkl(int offset) -
getLcbPlcfbkl
public int getLcbPlcfbkl()- Returns:
- Count of bytes in Plcfbkl
-
setLcbPlcfbkl
public void setLcbPlcfbkl(int length) -
setFcPlfLfo
public void setFcPlfLfo(int fcPlfLfo) -
setLcbPlfLfo
public void setLcbPlfLfo(int lcbPlfLfo) -
getFcSttbfffn
public int getFcSttbfffn() -
getLcbSttbfffn
public int getLcbSttbfffn() -
setFcSttbfffn
public void setFcSttbfffn(int fcSttbFffn) -
setLcbSttbfffn
public void setLcbSttbfffn(int lcbSttbFffn) -
getFcSttbfRMark
public int getFcSttbfRMark() -
getLcbSttbfRMark
public int getLcbSttbfRMark() -
setFcSttbfRMark
public void setFcSttbfRMark(int fcSttbfRMark) -
setLcbSttbfRMark
public void setLcbSttbfRMark(int lcbSttbfRMark) -
getPlcfHddOffset
public int getPlcfHddOffset()Return the offset to the PlcfHdd, in the table stream, i.e. fcPlcfHdd -
getPlcfHddSize
public int getPlcfHddSize()Return the size of the PlcfHdd, in the table stream, i.e. lcbPlcfHdd -
setPlcfHddOffset
public void setPlcfHddOffset(int fcPlcfHdd) -
setPlcfHddSize
public void setPlcfHddSize(int lcbPlcfHdd) -
getFcSttbSavedBy
public int getFcSttbSavedBy() -
getLcbSttbSavedBy
public int getLcbSttbSavedBy() -
setFcSttbSavedBy
public void setFcSttbSavedBy(int fcSttbSavedBy) -
setLcbSttbSavedBy
public void setLcbSttbSavedBy(int fcSttbSavedBy) -
getModifiedLow
public int getModifiedLow() -
getModifiedHigh
public int getModifiedHigh() -
setModifiedLow
public void setModifiedLow(int modifiedLow) -
setModifiedHigh
public void setModifiedHigh(int modifiedHigh) -
getCbMac
public int getCbMac()How many bytes of the main stream contain real data. -
setCbMac
public void setCbMac(int cbMac) Updates the count of the number of bytes in the main stream which contain real data -
getSubdocumentTextStreamLength
- Returns:
- length of specified subdocument text stream in characters
-
setSubdocumentTextStreamLength
-
clearOffsetsSizes
public void clearOffsetsSizes() -
getFieldsPlcfOffset
-
getFieldsPlcfLength
-
setFieldsPlcfOffset
-
setFieldsPlcfLength
-
getFcPlcffldAtn
Deprecated. -
getLcbPlcffldAtn
Deprecated. -
setFcPlcffldAtn
Deprecated. -
setLcbPlcffldAtn
Deprecated. -
getFcPlcffldEdn
Deprecated. -
getLcbPlcffldEdn
Deprecated. -
setFcPlcffldEdn
Deprecated. -
setLcbPlcffldEdn
Deprecated. -
getFcPlcffldFtn
Deprecated. -
getLcbPlcffldFtn
Deprecated. -
setFcPlcffldFtn
Deprecated. -
setLcbPlcffldFtn
Deprecated. -
getFcPlcffldHdr
Deprecated. -
getLcbPlcffldHdr
Deprecated. -
setFcPlcffldHdr
Deprecated. -
setLcbPlcffldHdr
Deprecated. -
getFcPlcffldHdrtxbx
Deprecated. -
getLcbPlcffldHdrtxbx
Deprecated. -
setFcPlcffldHdrtxbx
Deprecated. -
setLcbPlcffldHdrtxbx
Deprecated. -
getFcPlcffldMom
Deprecated. -
getLcbPlcffldMom
Deprecated. -
setFcPlcffldMom
Deprecated. -
setLcbPlcffldMom
Deprecated. -
getFcPlcffldTxbx
Deprecated. -
getLcbPlcffldTxbx
Deprecated. -
setFcPlcffldTxbx
Deprecated. -
setLcbPlcffldTxbx
Deprecated. -
getFSPAPlcfOffset
-
getFSPAPlcfLength
-
setFSPAPlcfOffset
-
setFSPAPlcfLength
-
getFcPlcspaMom
Deprecated. -
getLcbPlcspaMom
Deprecated. -
getFcDggInfo
public int getFcDggInfo() -
getLcbDggInfo
public int getLcbDggInfo() -
getNotesDescriptorsOffset
-
setNotesDescriptorsOffset
-
getNotesDescriptorsSize
-
setNotesDescriptorsSize
-
getNotesTextPositionsOffset
-
setNotesTextPositionsOffset
-
getNotesTextPositionsSize
-
setNotesTextPositionsSize
-
writeTo
- Throws:
IOException
-
getSize
public int getSize() -
getFibBase
-