public static class PdfWriter.PdfBody.PdfCrossReference extends Object implements Comparable<PdfWriter.PdfBody.PdfCrossReference>
PdfCrossReference
is an entry in the PDF Cross-Reference table.Constructor and Description |
---|
PdfCrossReference(int type,
int refnum,
long offset,
int generation) |
PdfCrossReference(int refnum,
long offset)
Constructs a cross-reference element for a PdfIndirectObject.
|
PdfCrossReference(int refnum,
long offset,
int generation)
Constructs a cross-reference element for a PdfIndirectObject.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PdfWriter.PdfBody.PdfCrossReference reference)
Compares current
entry with passed reference by PDF object number. |
boolean |
equals(Object obj)
Checks if two entries are equal if their PDF object numbers are equal.
|
int |
hashCode() |
void |
toPdf(int midSize,
OutputStream os)
Writes PDF syntax to the OutputStream
|
void |
toPdf(OutputStream os)
Writes PDF representation of cross-reference entry to passed output stream.
|
public PdfCrossReference(int refnum, long offset, int generation)
refnum
- offset
- byte offset of the objectgeneration
- generation number of the objectpublic PdfCrossReference(int refnum, long offset)
refnum
- offset
- byte offset of the objectpublic PdfCrossReference(int type, int refnum, long offset, int generation)
public void toPdf(OutputStream os) throws IOException
os
- Output stream this entry to write toIOException
- If any I/O error occurspublic void toPdf(int midSize, OutputStream os) throws IOException
midSize
- os
- IOException
public int compareTo(PdfWriter.PdfBody.PdfCrossReference reference)
entry
with passed reference
by PDF object number.compareTo
in interface Comparable<PdfWriter.PdfBody.PdfCrossReference>
public boolean equals(Object obj)
equals
in class Object
obj
- Another cross-reference entryPdfWriter.PdfBody.PdfCrossReference
or object numbers are not equal,
returns false; true otherwiseCopyright © 2020. All rights reserved.