PdfObject (JHOVE Documentation)
Date: 2013-09-08

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

## edu.harvard.hul.ois.jhove.module.pdf
Class PdfObject

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.pdf.PdfObject

Direct Known Subclasses:
  PdfArray, PdfDictionary, PdfIndirectObj, PdfPseudoObject, PdfSimpleObject, PdfStream

    public abstract class PdfObject

extends java.lang.Object

The abstract superclass for all representations of objects in PDF files. Objects may be created using the obj syntax, in which case they have an object and generation number, or they may be parts of other objects, in which case they don't. All subclasses should implement a constructor which has the object and generation numbers as its last two arguments, and one which has the same arguments except for omitting these two.

Field Summary
`protected int` | `_genNumber` PDF generation number.
`protected int` | `_objNumber` PDF object number.

Constructor Summary
`PdfObject()` Superclass constructor for which the object and generation number will be added separately or not at all.
`PdfObject(int objNumber, int genNumber)` Superclass constructor which should be called for all PdfObject instances that include an object and generation number.

Method Summary
`int` | `getGenNumber()` Returns the PDF generation number.
`int` | `getObjNumber()` Returns the PDF object number.
`void` | `setGenNumber(int num)` Sets the PDF generation number.
`void` | `setObjNumber(int num)` Sets the PDF object number.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _objNumber

    protected int _objNumber

  PDF object number.

### _genNumber

    protected int _genNumber

  PDF generation number.

Constructor Detail

### PdfObject

    public PdfObject(int objNumber,
                     int genNumber)

  Superclass constructor which should be called for all PdfObject instances that include an object and generation number.

  Parameters:
    `objNumber` - The PDF object number
    `genNumber` - The PDF generation number

### PdfObject

    public PdfObject()

  Superclass constructor for which the object and generation number will be added separately or not at all. Initializes the object and generation numbers to -1 to signify their absence.

Method Detail

### getObjNumber

    public int getObjNumber()

  Returns the PDF object number. If the object wasn't given an object number, returns -1.

### getGenNumber

    public int getGenNumber()

  Returns the PDF generation number. If the object wasn't given a generation number, returns -1.

### setObjNumber

    public void setObjNumber(int num)

  Sets the PDF object number.

### setGenNumber

    public void setGenNumber(int num)

  Sets the PDF generation number.

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