|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature
public class PDSignature
This represents a digital signature that can be attached to a document.
Field Summary | |
---|---|
static COSName |
FILTER_ADOBE_PPKLITE
A signature filter value. |
static COSName |
FILTER_CICI_SIGNIT
A signature filter value. |
static COSName |
FILTER_ENTRUST_PPKEF
A signature filter value. |
static COSName |
FILTER_VERISIGN_PPKVS
A signature filter value. |
static COSName |
SUBFILTER_ADBE_PKCS7_DETACHED
A signature subfilter value. |
static COSName |
SUBFILTER_ADBE_PKCS7_SHA1
A signature subfilter value. |
static COSName |
SUBFILTER_ADBE_X509_RSA_SHA1
A signature subfilter value. |
static COSName |
SUBFILTER_ETSI_CADES_DETACHED
A signature subfilter value. |
Constructor Summary | |
---|---|
PDSignature()
Default constructor. |
|
PDSignature(COSDictionary dict)
Constructor. |
Method Summary | |
---|---|
int[] |
getByteRange()
Read out the byterange from the file |
byte[] |
getContents(byte[] pdfFile)
Will return the embedded signature between the byterange gap. |
byte[] |
getContents(InputStream pdfFile)
Will return the embedded signature between the byterange gap. |
COSBase |
getCOSObject()
Convert this standard java object to a COS object. |
COSDictionary |
getDictionary()
Convert this standard java object to a COS dictionary. |
String |
getFilter()
|
String |
getLocation()
|
String |
getName()
|
String |
getReason()
|
Calendar |
getSignDate()
|
byte[] |
getSignedContent(byte[] pdfFile)
Will return the signed content of the document. |
byte[] |
getSignedContent(InputStream pdfFile)
Will return the signed content of the document. |
String |
getSubFilter()
|
void |
setByteRange(int[] range)
|
void |
setContents(byte[] bytes)
|
void |
setFilter(COSName filter)
|
void |
setLocation(String location)
|
void |
setName(String name)
|
void |
setReason(String reason)
|
void |
setSignDate(Calendar cal)
|
void |
setSubFilter(COSName subfilter)
Set a subfilter that specify the signature that should be used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final COSName FILTER_ADOBE_PPKLITE
public static final COSName FILTER_ENTRUST_PPKEF
public static final COSName FILTER_CICI_SIGNIT
public static final COSName FILTER_VERISIGN_PPKVS
public static final COSName SUBFILTER_ADBE_X509_RSA_SHA1
public static final COSName SUBFILTER_ADBE_PKCS7_DETACHED
public static final COSName SUBFILTER_ETSI_CADES_DETACHED
public static final COSName SUBFILTER_ADBE_PKCS7_SHA1
Constructor Detail |
---|
public PDSignature()
public PDSignature(COSDictionary dict)
dict
- The signature dictionary.Method Detail |
---|
public COSBase getCOSObject()
getCOSObject
in interface COSObjectable
public COSDictionary getDictionary()
public void setFilter(COSName filter)
public void setSubFilter(COSName subfilter)
subfilter
- the subfilter that shall be used.public void setName(String name)
public void setLocation(String location)
public void setReason(String reason)
public void setSignDate(Calendar cal)
public String getFilter()
public String getSubFilter()
public String getName()
public String getLocation()
public String getReason()
public Calendar getSignDate()
public void setByteRange(int[] range)
public int[] getByteRange()
public byte[] getContents(InputStream pdfFile) throws IOException
pdfFile
- The signed pdf file as InputStream
IOException
- if the pdfFile can't be readpublic byte[] getContents(byte[] pdfFile) throws IOException
pdfFile
- The signed pdf file as byte array
IOException
- if the pdfFile can't be readpublic void setContents(byte[] bytes)
public byte[] getSignedContent(InputStream pdfFile) throws IOException
pdfFile
- The signed pdf file as InputStream
IOException
- if the pdfFile can't be readpublic byte[] getSignedContent(byte[] pdfFile) throws IOException
pdfFile
- The signed pdf file as byte array
IOException
- if the pdfFile can't be read
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |