Package com.inet.pdfc.config
Class ArrayPdfSource
java.lang.Object
com.inet.pdfc.config.PdfSource
com.inet.pdfc.config.ArrayPdfSource
- All Implemented Interfaces:
Serializable,Comparable<PdfSource>
This is a
PdfSource which is solely based on in-memory data.- See Also:
-
Field Summary
Fields inherited from class com.inet.pdfc.config.PdfSource
KEY_LAST_MODIFIED, KEY_NAME, KEY_PASSWORD, KEY_PATH, KEY_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionArrayPdfSource(String name, long lastModified, byte[] content) Creates thePdfSourcefor in-memory data. -
Method Summary
Methods inherited from class com.inet.pdfc.config.PdfSource
compareTo, equals, getLanguage, getLastModified, getMetaProperties, getName, getPassword, getPath, hashCode, setLanguage, setPageLimit, setPassword
-
Constructor Details
-
ArrayPdfSource
Creates thePdfSourcefor in-memory data.- Parameters:
name- the name of the PDF, commonly the file name the PDF was read from, must not benulllastModified- the last modified timestamp of the PDF data; this time stamp is only relevant for the result export, it's not used in the comparisoncontent- the actual raw content of the PDF, must not be null- Throws:
IllegalArgumentException- in case the name or the content isnull- Since:
- 3.0
-
-
Method Details
-
getSize
public long getSize()Returns the size of the raw data in bytes -
getRawContent
public byte[] getRawContent()Returns the binary content of thisPdfSource- Returns:
- the binary content of this
PdfSource - Since:
- 3.0
-
getContent
Returns the readable content of this document source- Specified by:
getContentin classPdfSource- Returns:
- the readable content of this document source
- Throws:
IOException- thrown in case the source data cannot be accessed or does not exist
-