Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.documents.files
Class FileSpecification<TDataObject extends PdfDirectObject>

    java.lang.Object
      org.pdfclown.objects.PdfObjectWrapper<TDataObject>
          org.pdfclown.documents.files.FileSpecification<TDataObject>

All Implemented Interfaces:
  Cloneable, IPdfNamedObjectWrapper, IPdfObjectWrapper

Direct Known Subclasses:
  FullFileSpecification, SimpleFileSpecification

    @PDF(value=PDF11)
    public abstract class FileSpecification<TDataObject extends PdfDirectObject>

extends PdfObjectWrapper<TDataObject>
implements IPdfNamedObjectWrapper

Reference to the contents of another file (file specification) [PDF:1.6:3.10.2].

Since:
  0.0.7
Version:
  0.1.2, 12/28/12
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

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

### FileSpecification

    protected FileSpecification(Document context,
                                TDataObject baseDataObject)

### FileSpecification

    protected FileSpecification(PdfDirectObject baseObject)

Method Detail

### get

    public static SimpleFileSpecification get(Document context,
                                              String path)

  Creates a new reference to an external file.

  Parameters:
    `context` - Document context.
    `path` - File path.

### get

    public static FileSpecification<?> get(Document context,
                                           String path,
                                           boolean full)

  Creates a new reference to a file.

  Parameters:
    `context` - Document context.
    `path` - File path.
    `full` - Whether the reference is able to support extended dependencies.

### get

    public static FullFileSpecification get(EmbeddedFile embeddedFile,
                                            String filename)

  Creates a new reference to an embedded file.

  Parameters:
    `embeddedFile` - Embedded file corresponding to the reference.
    `filename` - Name corresponding to the reference.

### get

    public static FullFileSpecification get(Document context,
                                            URL url)

  Creates a new reference to a remote file.

  Parameters:
    `context` - Document context.
    `url` - Remote file location.

### wrap

    public static FileSpecification<?> wrap(PdfDirectObject baseObject)

  Instantiates an existing file reference.

  Parameters:
    `baseObject` - Base object.

### getAbsolutePath

    public String getAbsolutePath()

  Gets the file absolute path.

### getInputStream

    public IInputStream getInputStream()

  Gets an input stream to read from the file.

### getOutputStream

    public IOutputStream getOutputStream()

  Gets an output stream to write into the file.

### getPath

    public abstract String getPath()

  Gets the file path.

### getName

    public PdfString getName()

  Description copied from interface: `IPdfNamedObjectWrapper`
  Gets the object name.

  As names are tipically loosely-coupled with their corresponding PDF objects, name retrieval implies a costly reverse lookup into the document's name tree.

  Specified by:
    `getName` in interface `IPdfNamedObjectWrapper`

### getNamedBaseObject

    public PdfDirectObject getNamedBaseObject()

  Description copied from interface: `IPdfNamedObjectWrapper`
  Gets the object name, if available; otherwise, behaves like `getBaseObject()`.

  Specified by:
    `getNamedBaseObject` in interface `IPdfNamedObjectWrapper`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.