|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.qoppa.pdf.source.URLOnDemandPDFSource
public class URLOnDemandPDFSource
Implementation of the PDFSource interface that will load sections of a PDF on demand. This This PDFSource can be used to display the first page of the PDF before the whole PDF is loaded. The source creates a local copy of the PDF either in a byte array or a local temp file and downloads sections of the PDF only when they are accessed.
| Field Summary | |
|---|---|
static int |
STORE_BYTE_ARRAY
|
static int |
STORE_TEMP_FILE
|
| Constructor Summary | |
|---|---|
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". |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STORE_BYTE_ARRAY
public static final int STORE_TEMP_FILE
| Constructor Detail |
|---|
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| Method Detail |
|---|
public void setSectorSize(int sectorSize)
sectorSize - public int getSectorSize()
public boolean equals(PDFSource other)
equals in interface PDFSourcepublic String getName()
getName in interface PDFSourcepublic String getPath()
getPath in interface PDFSourcepublic URL getURL()
public PDFContent getContent()
throws IOException
getContent in interface PDFSourceIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||