java.lang.Object
org.jfree.pdf.internal.PDFObject
A PDF Object (also referred to as an 'Indirect Object' in the PDF
specification). Objects are identified within a document by their
PDF object number (which must be unique within the document) and their
PDF object generation number.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the PDF object generation number.int
Returns the PDF object number (specified in the constructor).abstract byte[]
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.Returns the PDF reference string for this object (for example,"2 0 R"
).private String
byte[]
Returns the PDF bytes representing this object.
-
Field Details
-
number
private int number -
generation
private int generation
-
-
Constructor Details
-
PDFObject
protected PDFObject(int number) Creates a new instance with the specified object number and the default generation number (0).- Parameters:
number
- the object number.
-
PDFObject
protected PDFObject(int number, int generation) Creates a new instance.- Parameters:
number
- the PDF object number (must be unique within the document).generation
- the PDF generation number.
-
-
Method Details
-
getNumber
public int getNumber()Returns the PDF object number (specified in the constructor).- Returns:
- The PDF object number.
-
getGeneration
public int getGeneration()Returns the PDF object generation number.- Returns:
- The PDF object generation number.
-
getReference
Returns the PDF reference string for this object (for example,"2 0 R"
). This is the PDF object number followed by a space followed by the PDF object generation number, followed by a space and an'R'
.- Returns:
- The PDF reference string.
-
toPDFBytes
Returns the PDF bytes representing this object.- Returns:
- The PDF bytes representing this object.
- Throws:
IOException
- if there is a problem writing to the byte array.
-
getObjectBytes
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Returns:
- A byte array.
- Throws:
IOException
- if there is a problem writing to the byte array.
-
objectIntroString
-