org.apache.pdfbox.pdmodel.common.filespecification
abstract public class: PDFileSpecification [javadoc |
source]
java.lang.Object
org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification
All Implemented Interfaces:
COSObjectable
Direct Known Subclasses:
PDComplexFileSpecification, PDSimpleFileSpecification
This represents a file specification.
Method from org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification Summary: |
---|
createFS, getFile, setFile |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification Detail: |
public static PDFileSpecification createFS(COSBase base) throws IOException {
PDFileSpecification retval = null;
if( base == null )
{
//then simply return null
}
else if( base instanceof COSString )
{
retval = new PDSimpleFileSpecification( (COSString)base );
}
else if( base instanceof COSDictionary )
{
retval = new PDComplexFileSpecification( (COSDictionary)base );
}
else
{
throw new IOException( "Error: Unknown file specification " + base );
}
return retval;
}
A file specfication can either be a COSString or a COSDictionary. This
will create the file specification either way. |
abstract public String getFile()
This will get the file name. |
abstract public void setFile(String file)
This will set the file name. |