Class CrossReferenceStream


  • public class CrossReferenceStream
    extends CrossReferenceObject
    A cross-reference stream, as described in Section 3.4.7 of the PDF 1.5 Reference.
    • Field Detail

      • XREF

        private static final PDFName XREF
      • objectNumber

        private final int objectNumber
      • objectReferences

        private final java.util.List<ObjectReference> objectReferences
    • Constructor Detail

      • CrossReferenceStream

        public CrossReferenceStream​(PDFDocument document,
                                    int objectNumber,
                                    TrailerDictionary trailerDictionary,
                                    long startxref,
                                    java.util.List<java.lang.Long> uncompressedObjectReferences,
                                    java.util.List<CompressedObjectReference> compressedObjectReferences)
    • Method Detail

      • output

        public void output​(java.io.OutputStream stream)
                    throws java.io.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:
        java.io.IOException - if an I/O exception occurs while writing the data
      • populateDictionary

        private void populateDictionary()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • addFreeEntryForObject0

        private void addFreeEntryForObject0​(java.io.DataOutputStream data)
                                     throws java.io.IOException
        Throws:
        java.io.IOException