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.tokens
Class XRefEntry

    java.lang.Object
      org.pdfclown.tokens.XRefEntry

All Implemented Interfaces:
  Cloneable

    public final class XRefEntry

extends Object
implements Cloneable

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

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

Nested Class Summary
`static class` | `XRefEntry.UsageEnum` Cross-reference table entry usage [PDF:1.6:3.4.3].

Field Summary
`static int` | `GenerationUnreusable` Unreusable generation [PDF:1.6:3.4.3].
`static int` | `UndefinedOffset` Undefined offset.

Constructor Summary
`XRefEntry(int number, int generation)` Instantiates a new in-use ordinary (uncompressed) object entry.
`XRefEntry(int number, int offset, int streamNumber)` Instantiates a compressed object entry.
`XRefEntry(int number, int generation, int offset, XRefEntry.UsageEnum usage)` Instantiates an original ordinary (uncompressed) object entry.

Method Summary
`protected XRefEntry` | `clone()`
`int` | `getGeneration()` Gets the generation number.
`int` | `getNumber()` Gets the object number.
`int` | `getOffset()` 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` | `getStreamNumber()` 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.
`XRefEntry.UsageEnum` | `getUsage()` Gets the usage state.
`void` | `setGeneration(int value)`
`void` | `setNumber(int value)`
`void` | `setOffset(int value)`
`void` | `setStreamNumber(int value)`
`void` | `setUsage(XRefEntry.UsageEnum value)`

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

Field Detail

### GenerationUnreusable

    public static final int GenerationUnreusable

  Unreusable generation [PDF:1.6:3.4.3].

  See Also:
    Constant Field Values

### UndefinedOffset

    public static final int UndefinedOffset

  Undefined offset.

  See Also:
    Constant Field Values

Constructor Detail

### XRefEntry

    public XRefEntry(int number,
                     int generation)

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

  Parameters:
    `number` - Object number.
    `generation` - Generation number.

### XRefEntry

    public XRefEntry(int number,
                     int generation,
                     int offset,
                     XRefEntry.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.

### XRefEntry

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

Method Detail

### getGeneration

    public int getGeneration()

  Gets the generation number.

### getNumber

    public int getNumber()

  Gets the object number.

### getOffset

    public int getOffset()

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

### getStreamNumber

    public int getStreamNumber()

  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.

### getUsage

    public XRefEntry.UsageEnum getUsage()

  Gets the usage state.

### setGeneration

    public void setGeneration(int value)

### setNumber

    public void setNumber(int value)

### setOffset

    public void setOffset(int value)

### setStreamNumber

    public void setStreamNumber(int value)

### setUsage

    public void setUsage(XRefEntry.UsageEnum value)

  See Also:
    `getUsage()`

### clone

    protected XRefEntry clone()
                       throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

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.