diff options
author | netconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-11-29 12:00:22 +0000 |
---|---|---|
committer | netconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-11-29 12:00:22 +0000 |
commit | 61a2d23ef72630934c603fe9ffb96ebebff6ee09 (patch) | |
tree | ce05c4470d3a7a2743b4956f512288d6d0d62187 /src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java | |
parent | 00809217ec7c890a844f9a7c667c71b550ad92a6 (diff) | |
download | pdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.tar.gz pdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.tar.bz2 pdf-as-3-61a2d23ef72630934c603fe9ffb96ebebff6ee09.zip |
PDF-AS API
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@233 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/impl/input/helper/DataSourceHelper.java | 17 |
1 files changed, 11 insertions, 6 deletions
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)
|