aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java
diff options
context:
space:
mode:
authornetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-09-06 12:18:45 +0000
committernetconomy <netconomy@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-09-06 12:18:45 +0000
commit85e574618b04a34d5e41444d17ce7e6d5a93cc5b (patch)
tree1720e8a11493b8175a927e7462687f8ec6848609 /src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java
parent148948fa82b26a78b5c2b7d0a79777474b64e581 (diff)
downloadpdf-as-3-85e574618b04a34d5e41444d17ce7e6d5a93cc5b.tar.gz
pdf-as-3-85e574618b04a34d5e41444d17ce7e6d5a93cc5b.tar.bz2
pdf-as-3-85e574618b04a34d5e41444d17ce7e6d5a93cc5b.zip
Streaming Rückbau
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@210 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/framework/input/DataSource.java15
1 files changed, 15 insertions, 0 deletions
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.
+ *
+ * <p>
+ * Calling this method indicates that you need a byte array for random <strong>read</strong> access.
+ * The DataSource implementation should of course cache this byte array to avoid too much memory usage.
+ * </p>
+ * <p>
+ * Performance analysis has shown that the libraries internally convert the streams to byte arrays and
+ * that file system access is very slow.
+ * </p>
+ *
+ * @return
+ */
+ public byte [] getAsByteArray();
}