aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java9
-rw-r--r--pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java1
2 files changed, 4 insertions, 6 deletions
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<String> itPDFAProfiles = signaturePDFAProfiles.iterator();
while (itPDFAProfiles.hasNext()) {
diff --git a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java
index 0708e249..b1a290e4 100644
--- a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java
+++ b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java
@@ -13,7 +13,6 @@ import java.util.List;
import javax.imageio.ImageIO;
-import sun.misc.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;