PDF Clown
0.0.8

it.stefanochizzolini.clown.objects
Class PdfReference

java.lang.Object
  extended by it.stefanochizzolini.clown.objects.PdfObject
      extended by it.stefanochizzolini.clown.objects.PdfDataObject
          extended by it.stefanochizzolini.clown.objects.PdfDirectObject
              extended by it.stefanochizzolini.clown.objects.PdfReference
All Implemented Interfaces:
IPdfIndirectObject, Cloneable, Comparable<PdfDirectObject>

public class PdfReference
extends PdfDirectObject
implements IPdfIndirectObject

PDF indirect reference object [PDF:1.6:3.2.9].

Version:
0.0.8
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
PdfReference(Parser.Reference reference, File file)
          For internal use only.
 
Method Summary
 Object clone(File context)
          Gets the clone of the object, registered inside the given file context.
 int compareTo(PdfDirectObject object)
           
 void delete()
          Removes the object from its file context.
 boolean equals(Object object)
           
 String getCrossReference(long offset)
           
 PdfDataObject getDataObject()
          Gets the actual data associated to the indirect reference.
 int getGenerationNumber()
           
 String getID()
           
 PdfIndirectObject getIndirectObject()
          Gets the indirect object associated to the indirect reference.
 String getIndirectReference()
           
 int getObjectNumber()
           
 PdfReference getReference()
          Gets the indirect reference associated to the indirect object.
 int hashCode()
           
 void setDataObject(PdfDataObject value)
           
 String toString()
           
 void writeTo(IOutputStream stream)
          Serializes the object to the given stream.
 
Methods inherited from class it.stefanochizzolini.clown.objects.PdfDirectObject
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfReference

public PdfReference(Parser.Reference reference,
                    File file)
For internal use only.

This is a necessary hack because indirect objects are unreachable on parsing bootstrap (see File(IInputStream) constructor).

Method Detail

compareTo

public int compareTo(PdfDirectObject object)
Specified by:
compareTo in interface Comparable<PdfDirectObject>
Specified by:
compareTo in class PdfDirectObject

equals

public boolean equals(Object object)
Overrides:
equals in class Object

getCrossReference

public String getCrossReference(long offset)

getGenerationNumber

public int getGenerationNumber()

getID

public String getID()

getIndirectReference

public String getIndirectReference()

getObjectNumber

public int getObjectNumber()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

writeTo

public void writeTo(IOutputStream stream)
Description copied from class: PdfObject
Serializes the object to the given stream.

Specified by:
writeTo in class PdfObject

clone

public Object clone(File context)
Description copied from class: PdfObject
Gets the clone of the object, registered inside the given file context.

Specified by:
clone in interface IPdfIndirectObject
Specified by:
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 interface: IPdfIndirectObject
Gets the indirect object associated to the indirect reference.

Specified by:
getIndirectObject in interface IPdfIndirectObject

getReference

public PdfReference getReference()
Description copied from interface: IPdfIndirectObject
Gets the indirect reference associated to the indirect object.

Specified by:
getReference in interface IPdfIndirectObject

setDataObject

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

PDF Clown
0.0.8

Project home page

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