Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.digitalsignature

public Class SigningSupport

extends Object
implements ExternalSigningSupport, Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable, org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport
Imports
org.apache.pdfbox.pdfwriter.COSWriter, java.io.Closeable, .IOException, .InputStream

Class to be used when creating PDF signatures externally. COSWriter is used to obtain data to be signed and set the resulted CMS signature.

Field Summary

Modifier and TypeField and Description
private COSWriter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public InputStream
public void
setSignature(byte[]
CMS signature as byte array
signature
)

Implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport.setSignature.

Set CMS signature bytes to PDF.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cosWriterback to summary
private COSWriter cosWriter

Constructor Detail

SigningSupportback to summary
public SigningSupport(COSWriter cosWriter)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
getContentback to summary
public InputStream getContent() throws IOException

Implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport.getContent.

Doc from org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport.getContent.

Get PDF content to be signed. Obtained InputStream must be closed after use.

Returns:InputStream

content stream

Annotations
@Override
Exceptions
IOException:
if the content could not be read
setSignatureback to summary
public void setSignature(byte[] signature) throws IOException

Implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport.setSignature.

Doc from org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport.setSignature.

Set CMS signature bytes to PDF.

Parameters
signature:byte[]

CMS signature as byte array

Annotations
@Override
Exceptions
IOException:
if exception occurred during PDF writing