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

## org.apache.fop.pdf
Class PDFReference

    java.lang.Object
      org.apache.fop.pdf.PDFReference

All Implemented Interfaces:
  PDFWritable

public class PDFReference
extends java.lang.Object
implements PDFWritable

Class representing a PDF object reference. The object holds a soft reference to the actual PDF object so the garbage collector can free the object if it's not referenced elsewhere. The important thing about the class is the reference information to the actual PDF object in the PDF file.

Constructor Summary
`PDFReference(PDFObject obj)` Creates a new PDF reference.
`PDFReference(java.lang.String ref)` Creates a new PDF reference, but without a reference to the original object.

Method Summary
`int` | `getGeneration()` Returns the generation.
`PDFObject` | `getObject()` Returns the PDF object
`int` | `getObjectNumber()` Returns the object number.
`void` | `outputInline(java.io.OutputStream out, java.io.Writer writer)` Writes a "direct object" (inline object) representation to the stream. A Writer is given for optimized encoding of text content. Since the Writer is buffered, make sure `flush()` is called before any direct calls to `out` are made.
`java.lang.String` | `toString()`

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

Constructor Detail

### PDFReference

    public PDFReference(PDFObject obj)

  Creates a new PDF reference.

Parameters:
  `obj` - the object to be referenced

### PDFReference

    public PDFReference(java.lang.String ref)

  Creates a new PDF reference, but without a reference to the original object.

Parameters:
  `ref` - an object reference

Method Detail

### getObject

    public PDFObject getObject()

  Returns the PDF object

  Returns:
    the PDF object, or null if it has been released

### getObjectNumber

    public int getObjectNumber()

  Returns the object number.

  Returns:
    the object number

### getGeneration

    public int getGeneration()

  Returns the generation.

  Returns:
    the generation

### toString

    public java.lang.String toString()

### outputInline

    public void outputInline(java.io.OutputStream out,
                             java.io.Writer writer)
                      throws java.io.IOException

  Writes a "direct object" (inline object) representation to the stream. A Writer is given for optimized encoding of text content. Since the Writer is buffered, make sure `flush()` is called before any direct calls to `out` are made.

  Specified by:
    `outputInline` in interface `PDFWritable`
  Parameters:
    `out` - the OutputStream (for binary content)
    `writer` - the Writer (for text content, wraps the above OutputStream)
  Throws:
    `java.io.IOException` - if an I/O error occurs

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

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.