com.lowagie.rups.model
Class PdfFile

java.lang.Object
  extended by com.lowagie.rups.model.PdfFile

public class PdfFile
extends Object

Wrapper for both iText's PdfReader (referring to a PDF file to read) and SUN's PDFFile (referring to the same PDF file to render).


Field Summary
protected  File directory
          The directory where the file can be found (if the PDF was passed as a file).
protected  String filename
          The original filename.
protected  com.sun.pdfview.PDFFile PDFFile
          SUN's PDFFile object.
protected  Permissions permissions
          The file permissions
protected  PdfReader reader
          The PdfReader object.
 
Constructor Summary
PdfFile(byte[] file)
          Constructs a PdfFile object.
PdfFile(File file)
          Constructs a PdfFile object.
 
Method Summary
 com.sun.pdfview.PDFFile getPDFFile()
          Getter for SUN's PDFFile object (for the renderer)
 PdfReader getPdfReader()
          Getter for iText's PdfReader object.
protected  void readFile(RandomAccessFileOrArray pdf)
          Does the actual reading of the file into PdfReader and PDFFile.
protected  RandomAccessFileOrArray workAround()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

protected File directory
The directory where the file can be found (if the PDF was passed as a file).


filename

protected String filename
The original filename.


reader

protected PdfReader reader
The PdfReader object.


PDFFile

protected com.sun.pdfview.PDFFile PDFFile
SUN's PDFFile object.


permissions

protected Permissions permissions
The file permissions

Constructor Detail

PdfFile

public PdfFile(File file)
        throws IOException,
               DocumentException
Constructs a PdfFile object.

Parameters:
file - the File to read
Throws:
IOException
DocumentException

PdfFile

public PdfFile(byte[] file)
        throws IOException,
               DocumentException
Constructs a PdfFile object.

Parameters:
file - the byte[] to read
Throws:
IOException
DocumentException
Method Detail

readFile

protected void readFile(RandomAccessFileOrArray pdf)
                 throws IOException,
                        DocumentException
Does the actual reading of the file into PdfReader and PDFFile.

Parameters:
pdf - a Random Access File or Array
Throws:
IOException
DocumentException

workAround

protected RandomAccessFileOrArray workAround()
                                      throws DocumentException,
                                             IOException
Throws:
DocumentException
IOException

getPdfReader

public PdfReader getPdfReader()
Getter for iText's PdfReader object.

Returns:
a PdfReader object

getPDFFile

public com.sun.pdfview.PDFFile getPDFFile()
Getter for SUN's PDFFile object (for the renderer)

Returns:
a PDFFile object

Hosted by Hostbasket