com.qoppa.pdf.source
Class MBBPDFSource

java.lang.Object
  extended by com.qoppa.pdf.source.MBBPDFSource
All Implemented Interfaces:
PDFSource

public class MBBPDFSource
extends Object
implements PDFSource

Implementation of the PDFSource interface that uses a MappedByteBuffer. This class opens a file using a MappedByteBuffer and fulfills the PDFSource interface by passing the calls on to the buffer.

Author:
Qoppa Software

Constructor Summary
MBBPDFSource(File source)
           
MBBPDFSource(String fileName)
           
 
Method Summary
 boolean equals(PDFSource other)
          Tests if this source is equal to another source.
 PDFContent getContent()
          Returns an object that implements PDFContent, that contains and can deliver the contents of the PDF document.
 File getFile()
          Returns the file that this PDF source represents.
 String getName()
          Returns the name of the document.
 String getPath()
          Returns the full path to the document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBBPDFSource

public MBBPDFSource(File source)
             throws PDFException
Throws:
PDFException

MBBPDFSource

public MBBPDFSource(String fileName)
             throws PDFException
Throws:
PDFException
Method Detail

getName

public String getName()
Description copied from interface: PDFSource
Returns the name of the document. The name of the document is normally the file name.

Specified by:
getName in interface PDFSource

getPath

public String getPath()
Description copied from interface: PDFSource
Returns the full path to the document. The path of the document should normally be sufficient to uniquely identify the document. If the source is a file, the path is the full path to the file.

Specified by:
getPath in interface PDFSource

equals

public boolean equals(PDFSource other)
Description copied from interface: PDFSource
Tests if this source is equal to another source.

Specified by:
equals in interface PDFSource

getFile

public File getFile()
Returns the file that this PDF source represents.

Returns:
The file that backs this PDF source.

getContent

public PDFContent getContent()
                      throws IOException
Description copied from interface: PDFSource
Returns an object that implements PDFContent, that contains and can deliver the contents of the PDF document.

Specified by:
getContent in interface PDFSource
Returns:
Returns an object that implements the PDFContent interface.
Throws:
IOException