PDF Clown
0.1.2

org.pdfclown.documents.files
Class EmbeddedFile

java.lang.Object
  extended by org.pdfclown.objects.PdfObjectWrapper<PdfStream>
      extended by org.pdfclown.documents.files.EmbeddedFile
All Implemented Interfaces:
Cloneable, IPdfObjectWrapper

@PDF(value=PDF13)
public final class EmbeddedFile
extends PdfObjectWrapper<PdfStream>

Embedded file [PDF:1.6:3.10.3].

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

Method Summary
 EmbeddedFile clone(Document context)
          Gets a clone of the object, registered inside the given document context.
static EmbeddedFile get(Document context, File file)
          Creates a new embedded file inside the document.
static EmbeddedFile get(Document context, IInputStream stream)
          Creates a new embedded file inside the document.
static EmbeddedFile get(Document context, String path)
          Creates a new embedded file inside the document.
 Date getCreationDate()
          Gets the creation date of this file.
 IBuffer getData()
          Gets the data contained within this file.
 String getMimeType()
          Gets the MIME media type name of this file [RFC 2046].
 Date getModificationDate()
          Gets the modification date of this file.
 int getSize()
          Gets the size of this file, in bytes.
 void setCreationDate(Date value)
           
 void setMimeType(String value)
           
 void setModificationDate(Date value)
           
 void setSize(int value)
           
static EmbeddedFile wrap(PdfDirectObject baseObject)
          Instantiates an existing embedded file.
 
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
checkCompatibility, 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
 

Method Detail

get

public static EmbeddedFile get(Document context,
                               String path)
Creates a new embedded file inside the document.

Parameters:
context - Document context.
path - Path of the file to embed.

get

public static EmbeddedFile get(Document context,
                               File file)
Creates a new embedded file inside the document.

Parameters:
context - Document context.
file - File to embed.

get

public static EmbeddedFile get(Document context,
                               IInputStream stream)
Creates a new embedded file inside the document.

Parameters:
context - Document context.
stream - File stream to embed.

wrap

public static EmbeddedFile wrap(PdfDirectObject baseObject)
Instantiates an existing embedded file.

Parameters:
baseObject - Base object.

clone

public EmbeddedFile clone(Document context)
Description copied from class: PdfObjectWrapper
Gets a clone of the object, registered inside the given document context.

Overrides:
clone in class PdfObjectWrapper<PdfStream>
Parameters:
context - Which document the clone has to be registered in.

getCreationDate

public Date getCreationDate()
Gets the creation date of this file.


getData

public IBuffer getData()
Gets the data contained within this file.


getMimeType

public String getMimeType()
Gets the MIME media type name of this file [RFC 2046].


getModificationDate

public Date getModificationDate()
Gets the modification date of this file.


getSize

public int getSize()
Gets the size of this file, in bytes.


setCreationDate

public void setCreationDate(Date value)
See Also:
getCreationDate()

setMimeType

public void setMimeType(String value)
See Also:
getMimeType()

setModificationDate

public void setModificationDate(Date value)
See Also:
getModificationDate()

setSize

public void setSize(int value)
See Also:
getSize()

PDF Clown
0.1.2

Project home page

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