org.sejda.model.input
Class PdfFileSource

java.lang.Object
  extended by org.sejda.model.input.AbstractPdfSource<File>
      extended by org.sejda.model.input.PdfFileSource
All Implemented Interfaces:
PdfSource<File>

public final class PdfFileSource
extends AbstractPdfSource<File>

AbstractPdfSource from a File

Author:
Andrea Vacondio

Method Summary
 File getSource()
           
static PdfFileSource newInstanceNoPassword(File file)
          Creates a new instance of the pdf source where a password is NOT required to open the source.
static PdfFileSource newInstanceWithPassword(File file, String password)
          Creates a new instance of the pdf source where a password is required to open the source.
<T> T
open(PdfSourceOpener<T> opener)
          Dispatch method to open the source.
 
Methods inherited from class org.sejda.model.input.AbstractPdfSource
getName, getPassword, getPasswordBytes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSource

public File getSource()
Returns:
the source

open

public <T> T open(PdfSourceOpener<T> opener)
       throws TaskIOException
Description copied from interface: PdfSource
Dispatch method to open the source.

Type Parameters:
T - generic type as result of the open action.
Returns:
result of the open action as a type defined by the dispatcher.
Throws:
TaskIOException - in case of error opening the source.

newInstanceNoPassword

public static PdfFileSource newInstanceNoPassword(File file)
Creates a new instance of the pdf source where a password is NOT required to open the source.

Parameters:
file - input pdf file
Returns:
a newly created instance

newInstanceWithPassword

public static PdfFileSource newInstanceWithPassword(File file,
                                                    String password)
Creates a new instance of the pdf source where a password is required to open the source.

Parameters:
file - input pdf file
password -
Returns:
a newly created instance


Copyright © 2013 sejda. All Rights Reserved.