org.sejda.model.input
Class AbstractPdfSource<T>
java.lang.Object
org.sejda.model.input.AbstractPdfSource<T>
- Type Parameters:
T - the generic type of the source
- All Implemented Interfaces:
- PdfSource<T>
- Direct Known Subclasses:
- PdfFileSource, PdfStreamSource, PdfURLSource
public abstract class AbstractPdfSource<T>
- extends Object
- implements PdfSource<T>
Skeletal implementation for a pdf input source.
- Author:
- Andrea Vacondio
AbstractPdfSource
public AbstractPdfSource(String name)
- Creates a source with the given name.
- Parameters:
name -
- Throws:
IllegalArgumentException - if the name is blank
AbstractPdfSource
public AbstractPdfSource(String name,
String password)
- Creates a source with the given name and password.
- Parameters:
name - password -
- Throws:
IllegalArgumentException - if the name is blank
getPassword
public String getPassword()
- Specified by:
getPassword in interface PdfSource<T>
- Returns:
- password needed to open the source. Cna be null.
getPasswordBytes
public byte[] getPasswordBytes()
- Returns:
- the password in bytes or null if no password has been set
getName
public String getName()
- Specified by:
getName in interface PdfSource<T>
- Returns:
- the name of this source
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013 sejda. All Rights Reserved.