diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-21 10:28:54 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-21 10:28:54 +0200 |
commit | d16a7c27a77399806d1e2c6ae082e98d456c3baf (patch) | |
tree | 309ec8c90dd8274375ebb8480dfc3e5cafeeedb6 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api | |
parent | 40841f154c31d8e9e6e670def11dcb5899f5db71 (diff) | |
download | pdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.tar.gz pdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.tar.bz2 pdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.zip |
PDF API update to ouput signed documents via output stream
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api')
3 files changed, 11 insertions, 9 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java index 6570c419..acfb7ef5 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java @@ -31,6 +31,7 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.security.Provider; import java.security.Security; import java.util.zip.ZipEntry; @@ -188,8 +189,8 @@ public class PdfAsFactory implements IConfigurationConstants { * @return */ public static SignParameter createSignParameter( - Configuration configuration, DataSource dataSource) { - SignParameter param = new SignParameterImpl(configuration, dataSource); + Configuration configuration, DataSource dataSource, OutputStream output) { + SignParameter param = new SignParameterImpl(configuration, dataSource, output); return param; } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignParameter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignParameter.java index c1bfe53f..6a7ccf24 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignParameter.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignParameter.java @@ -23,6 +23,8 @@ ******************************************************************************/ package at.gv.egiz.pdfas.lib.api.sign; +import java.io.OutputStream; + import at.gv.egiz.pdfas.lib.api.PdfAsParameter; public interface SignParameter extends PdfAsParameter { @@ -65,4 +67,10 @@ public interface SignParameter extends PdfAsParameter { * @return */ public IPlainSigner getPlainSigner(); + + /** + * Gets the outputstream, where the signed document will be written to + * @return + */ + public OutputStream getSignatureResult(); } diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignResult.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignResult.java index 180792ea..8084f8f1 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignResult.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/sign/SignResult.java @@ -23,18 +23,11 @@ ******************************************************************************/ package at.gv.egiz.pdfas.lib.api.sign; -import java.io.InputStream; import java.security.cert.X509Certificate; import at.gv.egiz.pdfas.lib.api.SignaturePosition; public interface SignResult { - /** - * Returns the filled output data sink. - * - * @return Returns the filled output data sink. - */ - public InputStream getOutputDocument(); /** * Returns the certificate of the signer. |