diff options
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/input')
-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)
|