# org.pdfclown.tokens.XRefEntry Class Reference

Cross-reference table entry [PDF:1.6:3.4.3]. More...

List of all members.

## Public Types
enum | UsageEnum { Free, InUse, InUseCompressed }
| Cross-reference table entry usage [PDF:1.6:3.4.3]. More...
## Public Member Functions
object | Clone ()
| XRefEntry (int number, int offset, int streamNumber)
| Instantiates a compressed object entry.
| XRefEntry (int number, int generation, int offset, UsageEnum usage)
| Instantiates an original ordinary (uncompressed) object entry.
| XRefEntry (int number, int generation)
| Instantiates a new in-use ordinary (uncompressed) object entry.
## Static Public Attributes
static readonly int | GenerationUnreusable = 65535
| Unreusable generation [PDF:1.6:3.4.3].
static readonly int | UndefinedOffset = -1
| Undefined offset.
## Properties
int | Generation`[get, set]`
| Gets the generation number.
int | Number`[get, set]`
| Gets the object number.
int | Offset`[get, set]`
| Gets its indirect-object byte offset within the serialized file (in-use entry), the next free-object object number (free entry) or the object index within its object stream (compressed entry).
int | StreamNumber`[get, set]`
| Gets the object number of the object stream in which this object is stored [PDF:1.6:3.4.7], in case it is a compressed one.
UsageEnum | Usage`[get, set]`
| Gets the usage state.

##

Cross-reference table entry [PDF:1.6:3.4.3].

## Member Enumeration Documentation

enum org::pdfclown::tokens::XRefEntry::UsageEnum

Cross-reference table entry usage [PDF:1.6:3.4.3].

Enumerator:

  Free | Free entry.
  InUse | Ordinary (uncompressed) object entry.
  InUseCompressed | Compressed object entry [PDF:1.6:3.4.6].

## Constructor & Destructor Documentation

org.pdfclown.tokens.XRefEntry.XRefEntry | ( | int | number,
|  | int | generation |
| ) |  |  |

Instantiates a new in-use ordinary (uncompressed) object entry.

Parameters:

  | number | Object number.
  | generation | Generation number.

org.pdfclown.tokens.XRefEntry.XRefEntry | ( | int | number,
|  | int | generation,
|  | int | offset,
|  | UsageEnum | usage |
| ) |  |  |

Instantiates an original ordinary (uncompressed) object entry.

Parameters:

  | number | Object number.
  | generation | Generation number.
  | offset | Indirect-object byte offset within the serialized file (in-use entry), or the next free-object object number (free entry).
  | usage | Usage state.

org.pdfclown.tokens.XRefEntry.XRefEntry | ( | int | number,
|  | int | offset,
|  | int | streamNumber |
| ) |  |  |

Instantiates a compressed object entry.

Parameters:

  | number | Object number.
  | offset | Object index within its object stream.
  | streamNumber | Object number of the object stream in which this object is stored.

## Member Function Documentation

object org.pdfclown.tokens.XRefEntry.Clone | ( |  | ) |

## Member Data Documentation

readonly int org.pdfclown.tokens.XRefEntry.GenerationUnreusable = 65535`[static]`

Unreusable generation [PDF:1.6:3.4.3].

readonly int org.pdfclown.tokens.XRefEntry.UndefinedOffset = -1`[static]`

Undefined offset.

## Property Documentation

int org.pdfclown.tokens.XRefEntry.Generation`[get, set]`

Gets the generation number.

int org.pdfclown.tokens.XRefEntry.Number`[get, set]`

Gets the object number.

Referenced by org.pdfclown.objects.PdfIndirectObject.Compress(), org.pdfclown.objects.PdfIndirectObject.Delete(), org.pdfclown.tokens.Reader.ReadInfo(), and org.pdfclown.objects.PdfIndirectObject.Uncompress().

int org.pdfclown.tokens.XRefEntry.Offset`[get, set]`

Gets its indirect-object byte offset within the serialized file (in-use entry), the next free-object object number (free entry) or the object index within its object stream (compressed entry).

Referenced by org.pdfclown.objects.PdfIndirectObject.Compress(), org.pdfclown.objects.PdfIndirectObject.Uncompress(), org.pdfclown.tokens.CompressedWriter.WriteIncremental(), and org.pdfclown.tokens.CompressedWriter.WriteStandard().

int org.pdfclown.tokens.XRefEntry.StreamNumber`[get, set]`

Gets the object number of the object stream in which this object is stored [PDF:1.6:3.4.7], in case it is a compressed one.

Returns:
  -1 in case this is not a compressed-object entry.

Referenced by org.pdfclown.objects.PdfIndirectObject.Compress(), and org.pdfclown.objects.PdfIndirectObject.Uncompress().

UsageEnum org.pdfclown.tokens.XRefEntry.Usage`[get, set]`

Gets the usage state.

Referenced by org.pdfclown.objects.PdfIndirectObject.Compress(), org.pdfclown.objects.PdfIndirectObject.IsCompressed(), org.pdfclown.objects.PdfIndirectObject.IsInUse(), and org.pdfclown.objects.PdfIndirectObject.Uncompress().

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.