FileDocCategorySizeDatePackage
FileInformationBlock.javaAPI DocApache Poi 3.0.19474Mon Jan 01 18:55:32 GMT 2007org.apache.poi.hwpf.model

FileInformationBlock

public class FileInformationBlock extends FIBAbstractType implements Cloneable
author
andy

Fields Summary
FIBLongHandler
_longHandler
FIBShortHandler
_shortHandler
FIBFieldHandler
_fieldHandler
Constructors Summary
public FileInformationBlock(byte[] mainDocument)
Creates a new instance of FileInformationBlock

        fillFields(mainDocument, 0);
    
Methods Summary
public voidclearOffsetsSizes()

      _fieldHandler.clearFields();
    
public voidfillVariableFields(byte[] mainDocument, byte[] tableStream)

      HashSet fieldSet = new HashSet();
      fieldSet.add(new Integer(FIBFieldHandler.STSHF));
      fieldSet.add(new Integer(FIBFieldHandler.CLX));
      fieldSet.add(new Integer(FIBFieldHandler.DOP));
      fieldSet.add(new Integer(FIBFieldHandler.PLCFBTECHPX));
      fieldSet.add(new Integer(FIBFieldHandler.PLCFBTEPAPX));
      fieldSet.add(new Integer(FIBFieldHandler.PLCFSED));
      fieldSet.add(new Integer(FIBFieldHandler.PLCFLST));
      fieldSet.add(new Integer(FIBFieldHandler.PLFLFO));
      fieldSet.add(new Integer(FIBFieldHandler.PLCFFLDMOM));
      fieldSet.add(new Integer(FIBFieldHandler.STTBFFFN));
      fieldSet.add(new Integer(FIBFieldHandler.STTBSAVEDBY));
      fieldSet.add(new Integer(FIBFieldHandler.MODIFIED));


      _shortHandler = new FIBShortHandler(mainDocument);
      _longHandler = new FIBLongHandler(mainDocument, _shortHandler.START + _shortHandler.sizeInBytes());
      _fieldHandler = new FIBFieldHandler(mainDocument,
                                          _shortHandler.START + _shortHandler.sizeInBytes() + _longHandler.sizeInBytes(),
                                          tableStream, fieldSet, true);
    
public intgetFcClx()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.CLX);
    
public intgetFcDop()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.DOP);
    
public intgetFcPlcfLst()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCFLST);
    
public intgetFcPlcfbteChpx()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCFBTECHPX);
    
public intgetFcPlcfbtePapx()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCFBTEPAPX);
    
public intgetFcPlcffldMom()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCFFLDMOM);
    
public intgetFcPlcfsed()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCFSED);
    
public intgetFcPlfLfo()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLFLFO);
    
public intgetFcStshf()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.STSHF);
    
public intgetFcSttbSavedBy()

        return _fieldHandler.getFieldOffset(FIBFieldHandler.STTBSAVEDBY);
    
public intgetFcSttbfffn()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.STTBFFFN);
    
public intgetLcbClx()

      return _fieldHandler.getFieldSize(FIBFieldHandler.CLX);
    
public intgetLcbDop()

      return _fieldHandler.getFieldSize(FIBFieldHandler.DOP);
    
public intgetLcbPlcfLst()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFLST);
    
public intgetLcbPlcfbteChpx()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFBTECHPX);
    
public intgetLcbPlcfbtePapx()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFBTEPAPX);
    
public intgetLcbPlcffldMom()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFFLDMOM);
    
public intgetLcbPlcfsed()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFSED);
    
public intgetLcbPlfLfo()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLFLFO);
    
public intgetLcbStshf()

      return _fieldHandler.getFieldSize(FIBFieldHandler.STSHF);
    
public intgetLcbSttbSavedBy()

        return _fieldHandler.getFieldSize(FIBFieldHandler.STTBSAVEDBY);
    
public intgetLcbSttbfffn()

      return _fieldHandler.getFieldSize(FIBFieldHandler.STTBFFFN);
    
public intgetModifiedHigh()

      return _fieldHandler.getFieldSize(FIBFieldHandler.PLFLFO);
    
public intgetModifiedLow()

      return _fieldHandler.getFieldOffset(FIBFieldHandler.PLFLFO);
    
public intgetSize()

      return super.getSize() + _shortHandler.sizeInBytes() +
        _longHandler.sizeInBytes() + _fieldHandler.sizeInBytes();
    
public voidsetCbMac(int cbMac)

      _longHandler.setLong(FIBLongHandler.CBMAC, cbMac);
    
public voidsetFcClx(int fcClx)

      _fieldHandler.setFieldOffset(FIBFieldHandler.CLX, fcClx);
    
public voidsetFcDop(int fcDop)

      _fieldHandler.setFieldOffset(FIBFieldHandler.DOP, fcDop);
    
public voidsetFcPlcfLst(int fcPlcfLst)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLCFLST, fcPlcfLst);
    
public voidsetFcPlcfbteChpx(int fcPlcfBteChpx)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLCFBTECHPX, fcPlcfBteChpx);
    
public voidsetFcPlcfbtePapx(int fcPlcfBtePapx)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLCFBTEPAPX, fcPlcfBtePapx);
    
public voidsetFcPlcfsed(int fcPlcfSed)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLCFSED, fcPlcfSed);
    
public voidsetFcPlfLfo(int fcPlfLfo)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLFLFO, fcPlfLfo);
    
public voidsetFcStshf(int fcStshf)

      _fieldHandler.setFieldOffset(FIBFieldHandler.STSHF, fcStshf);
    
public voidsetFcSttbSavedBy(int fcSttbSavedBy)

      _fieldHandler.setFieldOffset(FIBFieldHandler.STTBSAVEDBY, fcSttbSavedBy);
    
public voidsetFcSttbfffn(int fcSttbFffn)

      _fieldHandler.setFieldOffset(FIBFieldHandler.STTBFFFN, fcSttbFffn);
    
public voidsetLcbClx(int lcbClx)

      _fieldHandler.setFieldSize(FIBFieldHandler.CLX, lcbClx);
    
public voidsetLcbDop(int lcbDop)

      _fieldHandler.setFieldSize(FIBFieldHandler.DOP, lcbDop);
    
public voidsetLcbPlcfLst(int lcbPlcfLst)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLCFLST, lcbPlcfLst);
    
public voidsetLcbPlcfbteChpx(int lcbPlcfBteChpx)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLCFBTECHPX, lcbPlcfBteChpx);
    
public voidsetLcbPlcfbtePapx(int lcbPlcfBtePapx)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLCFBTEPAPX, lcbPlcfBtePapx);
    
public voidsetLcbPlcfsed(int lcbPlcfSed)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLCFSED, lcbPlcfSed);
    
public voidsetLcbPlfLfo(int lcbPlfLfo)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLFLFO, lcbPlfLfo);
    
public voidsetLcbStshf(int lcbStshf)

      _fieldHandler.setFieldSize(FIBFieldHandler.STSHF, lcbStshf);
    
public voidsetLcbSttbSavedBy(int fcSttbSavedBy)

      _fieldHandler.setFieldSize(FIBFieldHandler.STTBSAVEDBY, fcSttbSavedBy);
    
public voidsetLcbSttbfffn(int lcbSttbFffn)

      _fieldHandler.setFieldSize(FIBFieldHandler.STTBFFFN, lcbSttbFffn);
    
public voidsetModifiedHigh(int modifiedHigh)

      _fieldHandler.setFieldSize(FIBFieldHandler.PLFLFO, modifiedHigh);
    
public voidsetModifiedLow(int modifiedLow)

      _fieldHandler.setFieldOffset(FIBFieldHandler.PLFLFO, modifiedLow);
    
public voidwriteTo(byte[] mainStream, org.apache.poi.hwpf.model.io.HWPFOutputStream tableStream)

      //HWPFOutputStream mainDocument = sys.getStream("WordDocument");
      //HWPFOutputStream tableStream = sys.getStream("1Table");

      super.serialize(mainStream, 0);

      int size = super.getSize();
      _shortHandler.serialize(mainStream);
      _longHandler.serialize(mainStream, size + _shortHandler.sizeInBytes());
      _fieldHandler.writeTo(mainStream,
        super.getSize() + _shortHandler.sizeInBytes() + _longHandler.sizeInBytes(), tableStream);