PDF Clown
0.1.2

org.pdfclown.objects
Class PdfIndirectObject

java.lang.Object
  extended by org.pdfclown.objects.PdfObject
      extended by org.pdfclown.objects.PdfIndirectObject
All Implemented Interfaces:
Cloneable, IPdfIndirectObject, IVisitable

public class PdfIndirectObject
extends PdfObject
implements IPdfIndirectObject

PDF indirect object [PDF:1.6:3.2.9].

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

Constructor Summary
PdfIndirectObject(File file, PdfDataObject dataObject, XRefEntry xrefEntry)
          For internal use only.
 
Method Summary
 PdfObject accept(IVisitor visitor, Object data)
          Accepts a visit.
 PdfIndirectObject clone(File context)
          Creates a deep copy of this object within the specified file context.
 void compress(ObjectStream objectStream)
          Adds the data object to the specified object stream [PDF:1.6:3.4.6].
 void delete()
          Removes the object from its file context.
 void dropFile()
          For internal use only.
 void dropOriginal()
          For internal use only.
 PdfIndirectObject getContainer()
          Gets the indirect object containing this object.
 PdfDataObject getDataObject()
          Gets the actual data associated to the indirect reference.
 File getFile()
          Gets the file containing this object.
 PdfIndirectObject getIndirectObject()
          Gets the indirect object corresponding to this object.
 PdfObject getParent()
          Gets the parent of this object.
 PdfReference getReference()
          Gets the indirect reference of this object.
 XRefEntry getXrefEntry()
           
 int hashCode()
           
 boolean isCompressed()
          Gets whether this object is compressed within an object stream [PDF:1.6:3.4.6].
 boolean isInUse()
          Gets whether this object contains a data object.
 boolean isOriginal()
          Gets whether this object comes intact from an existing file.
 boolean isUpdateable()
          Gets whether the detection of object state changes is enabled.
 boolean isUpdated()
          Gets whether the initial state of this object has been modified.
protected  boolean isVirtual()
          Gets whether this object acts like a null-object placeholder.
 void setDataObject(PdfDataObject value)
           
 void setUpdateable(boolean value)
           
protected  void setUpdated(boolean value)
           
protected  void setVirtual(boolean value)
           
 PdfIndirectObject swap(PdfObject other)
          Swaps contents between this object and the other one.
 String toString()
           
 void uncompress()
          Removes the data object from its object stream [PDF:1.6:3.4.6].
 void writeTo(IOutputStream stream, File context)
          Serializes this object to the specified stream.
 
Methods inherited from class org.pdfclown.objects.PdfObject
clone, clone, getDataContainer, resolve, resolve, unresolve, unresolve, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfIndirectObject

public PdfIndirectObject(File file,
                         PdfDataObject dataObject,
                         XRefEntry xrefEntry)
For internal use only.

Parameters:
file - Associated file.
dataObject - Data object associated to the indirect object. It MUST be
  • null, if the indirect object is original or free;
  • NOT null, if the indirect object is new and in-use.
xrefEntry - Cross-reference entry associated to the indirect object. If the indirect object is new, its offset field MUST be set to 0.
Method Detail

accept

public PdfObject accept(IVisitor visitor,
                        Object data)
Description copied from interface: IVisitable
Accepts a visit.

Specified by:
accept in interface IVisitable
Parameters:
visitor - Visiting object.
data - Supplemental data.
Returns:
Result object.

compress

public void compress(ObjectStream objectStream)
Adds the data object to the specified object stream [PDF:1.6:3.4.6].

Parameters:
objectStream - Target object stream.

getContainer

public PdfIndirectObject getContainer()
Description copied from class: PdfObject
Gets the indirect object containing this object.

Overrides:
getContainer in class PdfObject
See Also:
PdfObject.getDataContainer(), PdfObject.getIndirectObject()

getFile

public File getFile()
Description copied from class: PdfObject
Gets the file containing this object.

Overrides:
getFile in class PdfObject

getParent

public PdfObject getParent()
Description copied from class: PdfObject
Gets the parent of this object.

Specified by:
getParent in class PdfObject
See Also:
PdfObject.getContainer()

getXrefEntry

public XRefEntry getXrefEntry()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isCompressed

public boolean isCompressed()
Gets whether this object is compressed within an object stream [PDF:1.6:3.4.6].


isInUse

public boolean isInUse()
Gets whether this object contains a data object.


isOriginal

public boolean isOriginal()
Gets whether this object comes intact from an existing file.


isUpdateable

public boolean isUpdateable()
Description copied from class: PdfObject
Gets whether the detection of object state changes is enabled.

Specified by:
isUpdateable in class PdfObject

setUpdateable

public void setUpdateable(boolean value)
Specified by:
setUpdateable in class PdfObject
See Also:
PdfObject.isUpdateable()

toString

public String toString()
Overrides:
toString in class Object

swap

public PdfIndirectObject swap(PdfObject other)
Description copied from class: PdfObject
Swaps contents between this object and the other one.

Specified by:
swap in class PdfObject
Parameters:
other - Object whose contents have to be swapped with this one's.
Returns:
This object.

uncompress

public void uncompress()
Removes the data object from its object stream [PDF:1.6:3.4.6].


writeTo

public void writeTo(IOutputStream stream,
                    File context)
Description copied from class: PdfObject
Serializes this object to the specified stream.

Specified by:
writeTo in class PdfObject
Parameters:
stream - Target stream.
context - File context.

clone

public PdfIndirectObject clone(File context)
Description copied from class: PdfObject
Creates a deep copy of this object within the specified file context.

Specified by:
clone in interface IPdfIndirectObject
Overrides:
clone in class PdfObject

delete

public void delete()
Description copied from interface: IPdfIndirectObject
Removes the object from its file context.

Remarks

The object is no more usable after this method returns.

Specified by:
delete in interface IPdfIndirectObject

getDataObject

public PdfDataObject getDataObject()
Description copied from interface: IPdfIndirectObject
Gets the actual data associated to the indirect reference.

Specified by:
getDataObject in interface IPdfIndirectObject

getIndirectObject

public PdfIndirectObject getIndirectObject()
Description copied from class: PdfObject
Gets the indirect object corresponding to this object.

Specified by:
getIndirectObject in interface IPdfIndirectObject
Overrides:
getIndirectObject in class PdfObject
See Also:
PdfObject.getContainer(), PdfObject.getDataContainer()

getReference

public PdfReference getReference()
Description copied from class: PdfObject
Gets the indirect reference of this object.

Specified by:
getReference in interface IPdfIndirectObject
Overrides:
getReference in class PdfObject

isUpdated

public boolean isUpdated()
Description copied from class: PdfObject
Gets whether the initial state of this object has been modified.

Specified by:
isUpdated in class PdfObject

setDataObject

public void setDataObject(PdfDataObject value)
Specified by:
setDataObject in interface IPdfIndirectObject
See Also:
IPdfIndirectObject.getDataObject()

isVirtual

protected boolean isVirtual()
Description copied from class: PdfObject
Gets whether this object acts like a null-object placeholder.

Specified by:
isVirtual in class PdfObject

setUpdated

protected void setUpdated(boolean value)
Specified by:
setUpdated in class PdfObject
See Also:
PdfObject.isUpdated()

setVirtual

protected void setVirtual(boolean value)
Specified by:
setVirtual in class PdfObject
See Also:
PdfObject.isVirtual()

dropFile

public void dropFile()
For internal use only.


dropOriginal

public void dropOriginal()
For internal use only.


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.