org.apache.pdfbox.pdfparser.xref

## Class ObjectStreamXReference

- java.lang.Object
- - org.apache.pdfbox.pdfparser.xref.AbstractXReference
  - - org.apache.pdfbox.pdfparser.xref.ObjectStreamXReference

All Implemented Interfaces:
  Comparable<XReferenceEntry>, XReferenceEntry

    public class ObjectStreamXReference
    extends AbstractXReference

A class representing a reference to an object stream entry in a PDF's crossreference stream (`PDFXRefStream`).

Author:
  Christian Appl

### Constructor Summary

Constructors
Constructor and Description
`ObjectStreamXReference(int objectStreamIndex, COSObjectKey key, COSBase object, COSObjectKey parentKey)` Prepares a object stream entry reference for the given `COSObject` in a PDF's crossreference stream (`PDFXRefStream`).

### Method Summary

All Methods Instance Methods Concrete Methods
`COSBase` `getObject()` Returns the `COSObject`, that is described by this crossreference stream entry.
`int` `getObjectStreamIndex()` Returns the index of the `COSObject` in it's containing object stream.
`COSObjectKey` `getParentKey()` Returns the `COSObjectKey` of the object stream, that is containing the object.
`COSObjectKey` `getReferencedKey()` Returns the `COSObjectKey` of the object, that is described by this crossreference stream entry.
`long` `getSecondColumnValue()` Returns the value for the second column of the crossreference stream entry.
`long` `getThirdColumnValue()` Returns the value for the third column of the crossreference stream entry.
`String` `toString()` Returns a string representation of this crossreference stream entry.

### Methods inherited from class org.apache.pdfbox.pdfparser.xref.AbstractXReference

`compareTo, getFirstColumnValue, getType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ObjectStreamXReference

    public ObjectStreamXReference(int objectStreamIndex,
                                  COSObjectKey key,
                                  COSBase object,
                                  COSObjectKey parentKey)

Prepares a object stream entry reference for the given `COSObject` in a PDF's crossreference stream (`PDFXRefStream`).

Parameters:
  `objectStreamIndex` - The index of the `COSObject` in the containing object stream.
  `key` - The `COSObjectKey`, that is represented by this entry.
  `object` - The `COSObject`, that is represented by this entry.
  `parentKey` - The `COSObjectKey` of the object stream, that is containing the object.

### Method Detail

#### getObjectStreamIndex

    public int getObjectStreamIndex()

Returns the index of the `COSObject` in it's containing object stream.

Returns:
  The index of the `COSObject` in it's containing object stream.

#### getReferencedKey

    public COSObjectKey getReferencedKey()

Returns the `COSObjectKey` of the object, that is described by this crossreference stream entry.

Returns:
  The `COSObjectKey` of the object, that is described by this crossreference stream entry.

#### getObject

    public COSBase getObject()

Returns the `COSObject`, that is described by this crossreference stream entry.

Returns:
  The `COSObject`, that is described by this crossreference stream entry.

#### getParentKey

    public COSObjectKey getParentKey()

Returns the `COSObjectKey` of the object stream, that is containing the object.

Returns:
  The `COSObjectKey` of the object stream, that is containing the object.

#### getSecondColumnValue

    public long getSecondColumnValue()

Returns the value for the second column of the crossreference stream entry. (This is object number from the `COSObjectKey` of the object stream, that is containing the object represented by this entry - for entries of this type..)

Returns:
  The value for the second column of the crossreference stream entry.

#### getThirdColumnValue

    public long getThirdColumnValue()

Returns the value for the third column of the crossreference stream entry. (This is index of the `COSObject` in the containing object stream - for entries of this type.)

Returns:
  The value for the third column of the crossreference stream entry.

#### toString

    public String toString()

Returns a string representation of this crossreference stream entry.

Overrides:
  `toString` in class `Object`
Returns:
  A string representation of this crossreference stream entry.