public abstract class SystemSecurityHandler extends Object implements ISystemSecurityHandler
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
void |
attach(STDocument stDoc)
Associate this
ISystemSecurityHandler with a STDocument. |
void |
authenticate()
Perform an authentication.
|
COSDictionary |
cosGetEncryption() |
static SystemSecurityHandler |
createFromSt(STDocument doc) |
static SystemSecurityHandler |
createNewV1() |
static SystemSecurityHandler |
createNewV2() |
static SystemSecurityHandler |
createNewV4() |
void |
detach(STDocument stDoc)
Disassociate this
ISystemSecurityHandler from STDocument. |
COSCompositeObject |
getContextObject()
The currently active container object in a read or write process.
|
COSEncryption |
getEncryption() |
int |
getLength()
The length of the encryption key in bits.
|
ISecurityHandler |
getSecurityHandler()
The associated pluggable
ISecurityHandler. |
abstract int |
getVersion() |
void |
initialize(STDocument doc)
Initialize this
ISystemSecurityHandler with a STDocument. |
COSCompositeObject |
popContextObject()
Pop the topmost container.
|
void |
pushContextObject(COSCompositeObject contextObject)
Push the current container.
|
void |
setLength(int length) |
void |
setSecurityHandler(ISecurityHandler pSecurityHandler)
Assign a new
ISecurityHandler. |
STDocument |
stGetDoc()
The associated
STDocument. |
void |
updateTrailer(COSDictionary trailer)
Upon writing a new trailer dictionary is created and must be propagated
to the
ISystemSecurityHandler. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecryptFile, decryptStream, decryptString, encryptFile, encryptStream, encryptStringpublic static final int DEFAULT_LENGTH
public static SystemSecurityHandler createFromSt(STDocument doc) throws COSSecurityException
COSSecurityExceptionpublic static SystemSecurityHandler createNewV1()
public static SystemSecurityHandler createNewV2()
public static SystemSecurityHandler createNewV4()
public void attach(STDocument stDoc) throws COSSecurityException
ISystemSecurityHandlerISystemSecurityHandler with a STDocument.
The ISystemSecurityHandler should add all its private information
to the document structure, in particular to the /Encrypt dictionary.
attach in interface ISystemSecurityHandlerCOSSecurityExceptionpublic void authenticate()
throws COSSecurityException
ISystemSecurityHandlerISecurityHandler.authenticate in interface ISystemSecurityHandlerCOSSecurityExceptionpublic COSDictionary cosGetEncryption()
public void detach(STDocument stDoc) throws COSSecurityException
ISystemSecurityHandlerISystemSecurityHandler from STDocument.
The ISystemSecurityHandler should remove all its private
information from the document structure, in particular from the /Encrypt
dictionary.
detach in interface ISystemSecurityHandlerCOSSecurityExceptionpublic COSCompositeObject getContextObject()
ISystemSecurityHandlergetContextObject in interface ISystemSecurityHandlerpublic COSEncryption getEncryption()
public int getLength()
ISystemSecurityHandlergetLength in interface ISystemSecurityHandlerpublic ISecurityHandler getSecurityHandler()
ISystemSecurityHandlerISecurityHandler.
By default this is one of the StandardSecurityHandler instances,
implementing security behavior of the /Standard security defined in PDF
spec.
getSecurityHandler in interface ISystemSecurityHandlerISecurityHandler.public abstract int getVersion()
public void initialize(STDocument doc) throws COSSecurityException
ISystemSecurityHandlerISystemSecurityHandler with a STDocument.
The ISystemSecurityHandler should initialize its state from the
information in the document structure, in particular from the /Encrypt
dictionary.
initialize in interface ISystemSecurityHandlerCOSSecurityExceptionpublic COSCompositeObject popContextObject()
ISystemSecurityHandlerpopContextObject in interface ISystemSecurityHandlerpublic void pushContextObject(COSCompositeObject contextObject)
ISystemSecurityHandlerpushContextObject in interface ISystemSecurityHandlercontextObject - The new active container.public void setLength(int length)
public void setSecurityHandler(ISecurityHandler pSecurityHandler) throws COSSecurityException
ISystemSecurityHandlerISecurityHandler.setSecurityHandler in interface ISystemSecurityHandlerpSecurityHandler - The new ISecurityHandler.COSSecurityExceptionpublic STDocument stGetDoc()
ISystemSecurityHandlerSTDocument.stGetDoc in interface ISystemSecurityHandlerSTDocument.public void updateTrailer(COSDictionary trailer)
ISystemSecurityHandlerISystemSecurityHandler.updateTrailer in interface ISystemSecurityHandlerCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.