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.objects
Class PdfReference

    java.lang.Object
      org.pdfclown.objects.PdfObject
          org.pdfclown.objects.PdfDataObject
              org.pdfclown.objects.PdfDirectObject
                  org.pdfclown.objects.PdfReference

All Implemented Interfaces:
  Cloneable, Comparable<PdfDirectObject>, IPdfIndirectObject, IVisitable

    public final class PdfReference

extends PdfDirectObject
implements IPdfIndirectObject

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

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

Constructor Summary
`PdfReference(FileParser.Reference reference, File file)` For internal use only.

Method Summary
`PdfObject` | `accept(IVisitor visitor, Object data)` Accepts a visit.
`PdfReference` | `clone(File context)` Creates a deep copy of this object within the specified file context.
`int` | `compareTo(PdfDirectObject object)`
`void` | `delete()` Removes the object from its file context.
`boolean` | `equals(Object object)`
`PdfDataObject` | `getDataObject()` Gets the actual data associated to the indirect reference.
`int` | `getGenerationNumber()` Gets the generation number.
`String` | `getId()` Gets the object identifier.
`PdfIndirectObject` | `getIndirectObject()` Gets the indirect object corresponding to this object.
`String` | `getIndirectReference()` Gets the object reference.
`int` | `getObjectNumber()` Gets the object number.
`PdfObject` | `getParent()` Gets the parent of this object.
`PdfReference` | `getReference()` Gets the indirect reference of this object.
`int` | `hashCode()`
`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)`
`PdfReference` | `swap(PdfObject other)` Swaps contents between this object and the other one.
`String` | `toString()`
`void` | `writeTo(IOutputStream stream, File context)` Serializes this object to the specified stream.

Methods inherited from class org.pdfclown.objects.PdfObject
`clone, clone, getContainer, getDataContainer, getFile, resolve, resolve, unresolve, unresolve, update`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PdfReference

    public PdfReference(FileParser.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

### 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.

### 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`

### getGenerationNumber

    public int getGenerationNumber()

  Gets the generation number.

### getId

    public String getId()

  Gets the object identifier.

  This corresponds to the serialized representation of an object identifier within a PDF file.

### getIndirectReference

    public String getIndirectReference()

  Gets the object reference.

  This corresponds to the serialized representation of a reference within a PDF file.

### getObjectNumber

    public int getObjectNumber()

  Gets the object number.

### 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()`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### 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`

### 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`

### setUpdateable

    public void setUpdateable(boolean value)

  Specified by:
    `setUpdateable` in class `PdfObject`
  See Also:
    `PdfObject.isUpdateable()`

### swap

    public PdfReference 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.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### 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 PdfReference 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`

### 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()`

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.