public class CadesSignatureExplorer2 extends SignatureExplorer2
acceptableExplicitPolicies, client, defaultSignaturePolicyId, securityContextId, validate
Constructor and Description |
---|
CadesSignatureExplorer2(RestPkiClient client)
Create a new instance using the given RestPkiClient.
|
Modifier and Type | Method and Description |
---|---|
CadesSignature |
open()
Performs the open signature operation.
|
CadesSignatureWithEncapsulatedContent |
openAndExtractContent()
Performs the open signature operation and extracts the encapsulated content.
|
void |
setDataFile(byte[] content)
Sets the data file binary content (needed only for signatures without encapsulated content, aka "detached signatures")
|
void |
setDataFile(java.io.InputStream stream)
Sets the data file input stream (needed only for signatures without encapsulated content, aka "detached signatures")
|
void |
setDataFile(java.nio.file.Path path)
Sets the data file path (needed only for signatures without encapsulated content, aka "detached signatures")
|
void |
setDataFile(java.lang.String path)
Sets the data file path (needed only for signatures without encapsulated content, aka "detached signatures")
|
fillRequest, setAcceptableExplicitPolicies, setDefaultSignaturePolicy, setSecurityContext, setSignatureFile, setSignatureFile, setSignatureFile, setSignatureFile, setSignatureFile, setValidate
public CadesSignatureExplorer2(RestPkiClient client)
client
- the RestPkiClient which shall be used.public void setDataFile(java.lang.String path)
path
- File path of the data file.public void setDataFile(java.nio.file.Path path)
path
- File path of the data file.public void setDataFile(java.io.InputStream stream)
stream
- InputStream associated with the data file.public void setDataFile(byte[] content)
content
- binary content associated with the data file.public CadesSignature open() throws RestException, java.io.IOException
RestException
- if an error occurs when calling REST PKI.java.io.IOException
- if an error occurs when trying to open the signature file or when trying to compute all
hashes from the original data file, both files have to be provided before this method is called.public CadesSignatureWithEncapsulatedContent openAndExtractContent() throws RestException, java.io.IOException
RestException
- if an error occurs when calling REST PKI.java.io.IOException
- if an error occurs when trying to open the signature file or when trying to compute all the
data hashes of the data file, both files had to be provided before this method was called.