From 8fd373b3c463350ba2112963b29901dec0921827 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Mon, 1 Sep 2014 09:52:51 +0200 Subject: removed API warnings --- .../test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pdf-as-cli/src/test/java') diff --git a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java index 8766a5bd..e14b8ca0 100644 --- a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java +++ b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java @@ -30,7 +30,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import sun.misc.IOUtils; +import org.apache.commons.io.IOUtils; + import at.gv.egiz.pdfas.common.settings.ISettings; import at.gv.egiz.pdfas.lib.api.ByteArrayDataSink; import at.gv.egiz.pdfas.lib.api.ByteArrayDataSource; @@ -87,8 +88,7 @@ public class SignaturProfileTest { } } - byte[] input = IOUtils.readFully(new FileInputStream(sourcePDF), - -1, true); + byte[] input = IOUtils.toByteArray(new FileInputStream(sourcePDF)); IPlainSigner signer = new PAdESSignerKeystore(KS_FILE, KS_ALIAS, KS_PASS, KS_KEY_PASS, KS_TYPE); @@ -114,8 +114,7 @@ public class SignaturProfileTest { fos.close(); } - byte[] inputPDFA = IOUtils.readFully(new FileInputStream(sourcePDFA), - -1, true); + byte[] inputPDFA = IOUtils.toByteArray(new FileInputStream(sourcePDFA)); Iterator itPDFAProfiles = signaturePDFAProfiles.iterator(); while (itPDFAProfiles.hasNext()) { -- cgit v1.2.3