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
public final class DocumentEncryptionAtom extends PositionDependentRecordAtom
A Document Encryption Atom (type 12052). Holds information on the Encryption of a Document
-
-
Constructor Summary
Constructors Modifier Constructor Description DocumentEncryptionAtom()protectedDocumentEncryptionAtom(byte[] source, int start, int len)For the Document Encryption Atom
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncryptionInfogetEncryptionInfo()StringgetEncryptionProviderName()Return the name of the encryption provider usedMap<String,Supplier<?>>getGenericProperties()intgetKeyLength()Return the length of the encryption key, in bitslonggetRecordType()We are of type 12052voidinitializeEncryptionInfo(int keyBits)Initializes the encryption settingsvoidupdateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup)Offer the record the list of records that have changed their location as part of the writeout.voidwriteOut(OutputStream out)Write the contents of the record back, so it can be written to disk-
Methods 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 Detail
-
initializeEncryptionInfo
public void initializeEncryptionInfo(int keyBits)
Initializes the encryption settings- Parameters:
keyBits- seeCipherAlgorithm.rc4for allowed values, use -1 for default size
-
getKeyLength
public int getKeyLength()
Return the length of the encryption key, in bits
-
getEncryptionProviderName
public String getEncryptionProviderName()
Return the name of the encryption provider used
-
getEncryptionInfo
public EncryptionInfo getEncryptionInfo()
- Returns:
- the
EncryptionInfoobject for details about encryption settings
-
getRecordType
public long getRecordType()
We are of type 12052- Specified by:
getRecordTypein classRecord
-
writeOut
public void writeOut(OutputStream out) throws IOException
Write the contents of the record back, so it can be written to disk- Specified by:
writeOutin classRecord- Throws:
IOException
-
updateOtherRecordReferences
public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup)
Description copied from class:PositionDependentRecordAtomOffer 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:
updateOtherRecordReferencesin interfacePositionDependentRecord- Specified by:
updateOtherRecordReferencesin classPositionDependentRecordAtom
-
-