Package org.apache.poi.hslf.record
Class PersistPtrHolder
java.lang.Object
org.apache.poi.hslf.record.Record
org.apache.poi.hslf.record.RecordAtom
org.apache.poi.hslf.record.PositionDependentRecordAtom
org.apache.poi.hslf.record.PersistPtrHolder
- All Implemented Interfaces:
GenericRecord
,PositionDependentRecord
General holder for PersistPtrFullBlock and PersistPtrIncrementalBlock
records. We need to handle them specially, since we have to go around
updating UserEditAtoms if they shuffle about on disk
These hold references to where slides "live". If the position of a slide
moves, then we have update all of these. If we come up with a new version
of a slide, then we have to add one of these to the end of the chain
(via CurrentUserAtom and UserEditAtom) pointing to the new slide location
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSlideLookup
(int slideID, int posOnDisk) Adds a new slide, notes or similar, to be looked up by this.void
clear()
remove all slide references Convenience method provided, for easier reviewing of invocationsint[]
Get the list of slides that this PersistPtrHolder knows about.long
Return the value we were given at creation, be it 6001 or 6002Get the lookup from slide numbers to byte offsets, for the slides known about by this PersistPtrHolder.void
updateOtherRecordReferences
(Map<Integer, Integer> oldToNewReferencesLookup) At write-out time, update the references to the sheets to their new positionsvoid
writeOut
(OutputStream out) Write the contents of the record back, so it can be written to diskMethods inherited from class org.apache.poi.hslf.record.PositionDependentRecordAtom
getLastOnDiskOffset, setLastOnDiskOffset
Methods inherited from class org.apache.poi.hslf.record.RecordAtom
getChildRecords, getMaxRecordLength, isAnAtom, setMaxRecordLength
Methods inherited from class org.apache.poi.hslf.record.Record
buildRecordAtOffset, createRecordForType, findChildRecords, getGenericChildren, getGenericRecordType, writeLittleEndian, writeLittleEndian
-
Method Details
-
getRecordType
public long getRecordType()Return the value we were given at creation, be it 6001 or 6002- Specified by:
getRecordType
in classRecord
-
getKnownSlideIDs
public int[] getKnownSlideIDs()Get the list of slides that this PersistPtrHolder knows about. (They will be the keys in the map for looking up the positions of these slides) -
getSlideLocationsLookup
Get the lookup from slide numbers to byte offsets, for the slides known about by this PersistPtrHolder. -
clear
public void clear()remove all slide references Convenience method provided, for easier reviewing of invocations -
addSlideLookup
public void addSlideLookup(int slideID, int posOnDisk) Adds a new slide, notes or similar, to be looked up by this. -
updateOtherRecordReferences
At write-out time, update the references to the sheets to their new positions- Specified by:
updateOtherRecordReferences
in interfacePositionDependentRecord
- Specified by:
updateOtherRecordReferences
in classPositionDependentRecordAtom
-
writeOut
Write the contents of the record back, so it can be written to disk- Specified by:
writeOut
in classRecord
- Throws:
IOException
-
getGenericProperties
-