Package org.apache.poi.hslf.record
Class DocumentEncryptionAtom
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.DocumentEncryptionAtom
- All Implemented Interfaces:
GenericRecord
,PositionDependentRecord
A Document Encryption Atom (type 12052). Holds information
on the Encryption of a Document
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the name of the encryption provider usedint
Return the length of the encryption key, in bitslong
We are of type 12052void
initializeEncryptionInfo
(int keyBits) Initializes the encryption settingsvoid
updateOtherRecordReferences
(Map<Integer, Integer> oldToNewReferencesLookup) Offer the record the list of records that have changed their location as part of the writeout.void
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
-
Constructor Details
-
DocumentEncryptionAtom
public DocumentEncryptionAtom()
-
-
Method Details
-
initializeEncryptionInfo
public void initializeEncryptionInfo(int keyBits) Initializes the encryption settings- Parameters:
keyBits
- seeCipherAlgorithm.rc4
for allowed values, use -1 for default size
-
getKeyLength
public int getKeyLength()Return the length of the encryption key, in bits -
getEncryptionProviderName
Return the name of the encryption provider used -
getEncryptionInfo
- Returns:
- the
EncryptionInfo
object for details about encryption settings
-
getRecordType
public long getRecordType()We are of type 12052- Specified by:
getRecordType
in classRecord
-
writeOut
Write the contents of the record back, so it can be written to disk- Specified by:
writeOut
in classRecord
- Throws:
IOException
-
updateOtherRecordReferences
Description copied from class:PositionDependentRecordAtom
Offer the record the list of records that have changed their location as part of the writeout. Allows records to update their internal pointers to other records locations- Specified by:
updateOtherRecordReferences
in interfacePositionDependentRecord
- Specified by:
updateOtherRecordReferences
in classPositionDependentRecordAtom
-
getGenericProperties
-