Module org.sejda.sambox
Class PDComplexFileSpecification
java.lang.Object
org.sejda.sambox.pdmodel.common.filespecification.PDComplexFileSpecification
- All Implemented Interfaces:
COSObjectable,PDFileSpecification
This represents a file specification.
- Author:
- Ben Litchfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the embedded file.Get the embedded dos file.Get the embedded Mac file.Get the embedded unicode file.Get the embedded Unix file.getFile()This will get the description.This will get the name representing a Dos file.This will get the name representing a Mac file.Preferred method for getting the filename.This will get the unicode file name.This will get the name representing a Unix file.booleanGet if the file is volatile.voidsetCollectionItem(COSDictionary dictionary) Set the collection item dictionaryvoidSet the embedded file for this spec.voidDeprecated.This method is obsolescent and should not be used by conforming writers.voidDeprecated.This method is obsolescent and should not be used by conforming writers.voidSet the embedded Unicode file for this spec.voidDeprecated.This method is obsolescent and should not be used by conforming writers.voidThis will set the file name.voidsetFileDescription(String description) Set the file description.voidsetFileDos(String file) Deprecated.This method is obsolescent and should not be used by conforming writers.voidsetFileMac(String file) Deprecated.This method is obsolescent and should not be used by conforming writers.voidsetFileUnicode(String file) This will set the unicode file name.voidsetFileUnix(String file) Deprecated.This method is obsolescent and should not be used by conforming writers.voidsetVolatile(boolean fileIsVolatile) Tell if the underlying file is volatile and should not be cached by the reader application.
-
Constructor Details
-
PDComplexFileSpecification
- Parameters:
dict- The file specification dictionary.
-
-
Method Details
-
getCOSObject
- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The
COSBasethat matches this Java object.
-
getFilename
Preferred method for getting the filename. It will determinate the recommended file name.
First of all we try to get the unicode filename if it exist. If it doesn't exist we take a look at the DOS, MAC UNIX filenames. If no one exist the required F entry will be returned.
- Returns:
- The preferred file name.
-
getFileUnicode
This will get the unicode file name.- Returns:
- The file name.
-
setFileUnicode
This will set the unicode file name. If you call this, then do not forget to also callsetFile(String)or the attachment will not be visible on some viewers.- Parameters:
file- The name of the file.
-
getFile
- Specified by:
getFilein interfacePDFileSpecification- Returns:
- The file name.
-
setFile
This will set the file name. You should also callsetFileUnicode(String)for cross-platform and cross-language compatibility.- Specified by:
setFilein interfacePDFileSpecification- Parameters:
file- The name of the file.
-
getFileDos
This will get the name representing a Dos file.- Returns:
- The file name.
-
setFileDos
Deprecated.This method is obsolescent and should not be used by conforming writers.This will set name representing a dos file.- Parameters:
file- The name of the file.
-
getFileMac
This will get the name representing a Mac file.- Returns:
- The file name.
-
setFileMac
Deprecated.This method is obsolescent and should not be used by conforming writers.This will set name representing a Mac file.- Parameters:
file- The name of the file.
-
getFileUnix
This will get the name representing a Unix file.- Returns:
- The file name.
-
setFileUnix
Deprecated.This method is obsolescent and should not be used by conforming writers.This will set name representing a Unix file.- Parameters:
file- The name of the file.
-
setVolatile
public void setVolatile(boolean fileIsVolatile) Tell if the underlying file is volatile and should not be cached by the reader application. Default: false- Parameters:
fileIsVolatile- The new value for the volatility of the file.
-
isVolatile
public boolean isVolatile()Get if the file is volatile. Default: false- Returns:
- True if the file is volatile attribute is set.
-
getEmbeddedFile
Get the embedded file.- Returns:
- The embedded file for this file spec.
-
setEmbeddedFile
Set the embedded file for this spec. You should also callsetEmbeddedFileUnicode(PDEmbeddedFile)for cross-platform and cross-language compatibility.- Parameters:
file- The file to be embedded.
-
getEmbeddedFileDos
Get the embedded dos file.- Returns:
- The embedded dos file for this file spec.
-
setEmbeddedFileDos
Deprecated.This method is obsolescent and should not be used by conforming writers.Set the embedded dos file for this spec.- Parameters:
file- The dos file to be embedded.
-
getEmbeddedFileMac
Get the embedded Mac file.- Returns:
- The embedded Mac file for this file spec.
-
setEmbeddedFileMac
Deprecated.This method is obsolescent and should not be used by conforming writers.Set the embedded Mac file for this spec.- Parameters:
file- The Mac file to be embedded.
-
getEmbeddedFileUnix
Get the embedded Unix file.- Returns:
- The embedded file for this file spec.
-
setEmbeddedFileUnix
Deprecated.This method is obsolescent and should not be used by conforming writers.Set the embedded Unix file for this spec.- Parameters:
file- The Unix file to be embedded.
-
getEmbeddedFileUnicode
Get the embedded unicode file.- Returns:
- The embedded unicode file for this file spec.
-
setEmbeddedFileUnicode
Set the embedded Unicode file for this spec. If you call this, then do not forget to also callsetEmbeddedFile(PDEmbeddedFile)or the attachment will not be visible on some viewers.- Parameters:
file- The Unicode file to be embedded.
-
getBestEmbeddedFile
- Returns:
- the first/best available alternative of the embedded file
-
setFileDescription
Set the file description.- Parameters:
description- The file description
-
getFileDescription
This will get the description.- Returns:
- The file description.
-
setCollectionItem
Set the collection item dictionary- Parameters:
the- collection item dictionary
-