CrossReferenceStream (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.pdf.xref

## Class CrossReferenceStream

- java.lang.Object
- - org.apache.fop.pdf.xref.CrossReferenceObject
  - - org.apache.fop.pdf.xref.CrossReferenceStream

-     public class CrossReferenceStream
      extends CrossReferenceObject

  A cross-reference stream, as described in Section 3.4.7 of the PDF 1.5 Reference.

- - ### Field Summary

    - ### Fields inherited from class org.apache.fop.pdf.xref.CrossReferenceObject

      `startxref, trailerDictionary`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CrossReferenceStream(PDFDocument document, int objectNumber, TrailerDictionary trailerDictionary, long startxref, List<Long> uncompressedObjectReferences, List<CompressedObjectReference> compressedObjectReferences)`
    `` | `CrossReferenceStream(PDFDocument document, TrailerDictionary trailerDictionary, long startxref, List<Long> uncompressedObjectReferences, List<CompressedObjectReference> compressedObjectReferences)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `output(OutputStream stream)` Writes the cross reference data to a PDF stream

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

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

- - ### Constructor Detail

    - #### CrossReferenceStream

          public CrossReferenceStream(PDFDocument document,
                                      TrailerDictionary trailerDictionary,
                                      long startxref,
                                      List<Long> uncompressedObjectReferences,
                                      List<CompressedObjectReference> compressedObjectReferences)

    - #### CrossReferenceStream

          protected CrossReferenceStream(PDFDocument document,
                                         int objectNumber,
                                         TrailerDictionary trailerDictionary,
                                         long startxref,
                                         List<Long> uncompressedObjectReferences,
                                         List<CompressedObjectReference> compressedObjectReferences)

  - ### Method Detail

    - #### output

          public void output(OutputStream stream)
                      throws IOException

      Writes the cross reference data to a PDF stream
      Specified by:
        `output` in class `CrossReferenceObject`
      Parameters:
        `stream` - the stream to write the cross reference to
      Throws:
        `IOException` - if an I/O exception occurs while writing the data

Copyright © 2025 Apache Software Foundation. All rights reserved.