if (uea == null || pph == null || uea.getPersistPointersOffset() != pph.getLastOnDiskOffset()) { throw new EncryptedDocumentException("UserEditAtom and PersistPtrHolder must exist and their offset need to match."); recordMap.put(pph.getLastOnDiskOffset(), pph); recordMap.put(uea.getLastOnDiskOffset(), uea);
PersistPtrHolder ptr = (PersistPtrHolder)records[ptrIdx]; UserEditAtom uea = ((UserEditAtom)records[ueaIdx]); dea.setLastOnDiskOffset(ptr.getLastOnDiskOffset()-1); int nextSlideId = uea.getMaxPersistWritten()+1; ptr.addSlideLookup(nextSlideId, ptr.getLastOnDiskOffset()-1); uea.setEncryptSessionPersistIdRef(nextSlideId); uea.setMaxPersistWritten(nextSlideId);