From 61a2d23ef72630934c603fe9ffb96ebebff6ee09 Mon Sep 17 00:00:00 2001 From: netconomy Date: Thu, 29 Nov 2007 12:00:22 +0000 Subject: PDF-AS API git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@233 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../egiz/pdfas/impl/input/helper/DataSourceHelper.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/gv/egiz/pdfas/impl/input') diff --git a/src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java b/src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java index 138b269..2a3fedd 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java @@ -75,6 +75,17 @@ public class DataSourceHelper { try { + return convertInputStreamToByteArrayIOEx(inputStream); + } + catch (IOException e) + { + log.error(e); + throw new RuntimeException(e); + } + } + + public static byte [] convertInputStreamToByteArrayIOEx(InputStream inputStream) throws IOException + { PerformanceCounters.byteArrays.increment(); ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); @@ -92,12 +103,6 @@ public class DataSourceHelper byte [] data = baos.toByteArray(); return data; - } - catch (IOException e) - { - log.error(e); - throw new RuntimeException(e); - } } public static void debugDataSourceToFile(DataSource dataSource, File file) -- cgit v1.2.3