From 85e574618b04a34d5e41444d17ce7e6d5a93cc5b Mon Sep 17 00:00:00 2001 From: netconomy Date: Thu, 6 Sep 2007 12:18:45 +0000 Subject: =?UTF-8?q?Streaming=20R=C3=BCckbau?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@210 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../java/at/gv/egiz/pdfas/framework/input/DataSource.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/java/at/gv/egiz/pdfas/framework/input') diff --git a/src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java b/src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java index 265cb0c..fcf55b8 100644 --- a/src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java +++ b/src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java @@ -32,4 +32,19 @@ public interface DataSource */ public int getLength(); + /** + * Returns the data of this DataSource as a byte array. + * + *

+ * Calling this method indicates that you need a byte array for random read access. + * The DataSource implementation should of course cache this byte array to avoid too much memory usage. + *

+ *

+ * Performance analysis has shown that the libraries internally convert the streams to byte arrays and + * that file system access is very slow. + *

+ * + * @return + */ + public byte [] getAsByteArray(); } -- cgit v1.2.3