aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-tests
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-21 10:28:54 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-21 10:28:54 +0200
commitd16a7c27a77399806d1e2c6ae082e98d456c3baf (patch)
tree309ec8c90dd8274375ebb8480dfc3e5cafeeedb6 /pdf-as-tests
parent40841f154c31d8e9e6e670def11dcb5899f5db71 (diff)
downloadpdf-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-tests')
-rw-r--r--pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignatureTest.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignatureTest.java b/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignatureTest.java
index 6b18afa5..f0e47896 100644
--- a/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignatureTest.java
+++ b/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignatureTest.java
@@ -101,9 +101,9 @@ public class SignatureTest {
pdfAs = PdfAsFactory.createPdfAs(new File(baseTestData
.getConfigurationFile()));
Configuration configuration = pdfAs.getConfiguration();
-
+ FileOutputStream fos = new FileOutputStream(outputPdfFile, false);
signParameter = PdfAsFactory.createSignParameter(configuration,
- dataSource);
+ dataSource, fos);
String id = UUID.randomUUID().toString();
signParameter.setTransactionId(id);
@@ -157,11 +157,9 @@ public class SignatureTest {
signParameter.setSignatureProfileId(baseTestData.getProfilID());
logger.debug("Starting signature for " + baseTestData.getPdfFile());
logger.debug("Selected signature Profile " + baseTestData.getProfilID());
- SignResult result = pdfAs.sign(signParameter);
- FileOutputStream fos = null;
+ @SuppressWarnings("unused")
+ SignResult result = pdfAs.sign(signParameter);
try {
- fos = new FileOutputStream(outputPdfFile, false);
- IOUtils.copy(result.getOutputDocument(), fos);
fos.close();
} catch (IOException e) {
logger.debug("IO exception occured while writing PDF output file",