|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfclown.objects.PdfObjectWrapper<TDataObject>
org.pdfclown.documents.files.FileSpecification<TDataObject>
@PDF(value=PDF11) public abstract class FileSpecification<TDataObject extends PdfDirectObject>
Reference to the contents of another file (file specification) [PDF:1.6:3.10.2].
Constructor Summary | |
---|---|
protected |
FileSpecification(Document context,
TDataObject baseDataObject)
|
protected |
FileSpecification(PdfDirectObject baseObject)
|
Method Summary | |
---|---|
static SimpleFileSpecification |
get(Document context,
String path)
Creates a new reference to an external file. |
static FileSpecification<?> |
get(Document context,
String path,
boolean full)
Creates a new reference to a file. |
static FullFileSpecification |
get(Document context,
URL url)
Creates a new reference to a remote file. |
static FullFileSpecification |
get(EmbeddedFile embeddedFile,
String filename)
Creates a new reference to an embedded file. |
String |
getAbsolutePath()
Gets the file absolute path. |
IInputStream |
getInputStream()
Gets an input stream to read from the file. |
PdfString |
getName()
Gets the object name. |
PdfDirectObject |
getNamedBaseObject()
Gets the object name, if available; otherwise, behaves like getBaseObject() . |
IOutputStream |
getOutputStream()
Gets an output stream to write into the file. |
abstract String |
getPath()
Gets the file path. |
static FileSpecification<?> |
wrap(PdfDirectObject baseObject)
Instantiates an existing file reference. |
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper |
---|
checkCompatibility, clone, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pdfclown.objects.IPdfObjectWrapper |
---|
getBaseObject |
Constructor Detail |
---|
protected FileSpecification(Document context, TDataObject baseDataObject)
protected FileSpecification(PdfDirectObject baseObject)
Method Detail |
---|
public static SimpleFileSpecification get(Document context, String path)
context
- Document context.path
- File path.public static FileSpecification<?> get(Document context, String path, boolean full)
context
- Document context.path
- File path.full
- Whether the reference is able to support extended dependencies.public static FullFileSpecification get(EmbeddedFile embeddedFile, String filename)
embeddedFile
- Embedded file corresponding to the reference.filename
- Name corresponding to the reference.public static FullFileSpecification get(Document context, URL url)
context
- Document context.url
- Remote file location.public static FileSpecification<?> wrap(PdfDirectObject baseObject)
baseObject
- Base object.public String getAbsolutePath()
public IInputStream getInputStream()
public IOutputStream getOutputStream()
public abstract String getPath()
public PdfString getName()
IPdfNamedObjectWrapper
As names are tipically loosely-coupled with their corresponding PDF objects, name retrieval implies a costly reverse lookup into the document's name tree.
getName
in interface IPdfNamedObjectWrapper
public PdfDirectObject getNamedBaseObject()
IPdfNamedObjectWrapper
getBaseObject()
.
getNamedBaseObject
in interface IPdfNamedObjectWrapper
|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |