public class URLOnDemandPDFSource extends Object implements PDFSource
Modifier and Type | Field and Description |
---|---|
static int |
STORE_BYTE_ARRAY |
static int |
STORE_TEMP_FILE |
Constructor and Description |
---|
URLOnDemandPDFSource(URL url,
File tempFile)
Create a PDFSource to read a PDF from a URL "on demand".
|
URLOnDemandPDFSource(URL url,
int storeType)
Create a PDFSource to read a PDF from a URL "on demand".
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(PDFSource other)
Compares this PDF source to anothe URLOnDemandPDFSource for equality.
|
PDFContent |
getContent()
Create an object to implement PDFContent.
|
String |
getName()
Gets the name of this PDF source.
|
String |
getPath()
Returns the URL path to the PDF document.
|
int |
getSectorSize()
Returns the current sector size.
|
URL |
getURL()
Returns the URL where the PDF came from.
|
void |
setSectorSize(int sectorSize)
Set the sector size to use when reading the PDF.
|
public static final int STORE_BYTE_ARRAY
public static final int STORE_TEMP_FILE
public URLOnDemandPDFSource(URL url, int storeType) throws PDFException
url
- The URL to the PDF document.storeType
- The type of local storage to use. This can be STORE_BYTE_ARRAY to keep local content
in a byte array, or STORE_TEMP_FILE to store the contents in a temporary file.PDFException
public URLOnDemandPDFSource(URL url, File tempFile) throws PDFException
url
- The URL to the PDF document.tempFile
- A temporary file used to store the PDF content locally.PDFException
public void setSectorSize(int sectorSize)
sectorSize
- public int getSectorSize()
public boolean equals(PDFSource other)
public String getName()
public String getPath()
public URL getURL()
public PDFContent getContent() throws IOException
getContent
in interface PDFSource
IOException