public abstract class PDFObject
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
PDFObject(int number)
Creates a new instance with the specified object number and the default
generation number (0).
|
protected |
PDFObject(int number,
int generation)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getGeneration()
Returns the PDF object generation number.
|
int |
getNumber()
Returns the PDF object number (specified in the constructor).
|
abstract byte[] |
getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the
PDF output for this object.
|
java.lang.String |
getReference()
Returns the PDF reference string for this object (for example,
"2 0 R" ). |
byte[] |
toPDFBytes()
Returns the PDF bytes representing this object.
|
protected PDFObject(int number)
number
- the object number.protected PDFObject(int number, int generation)
number
- the PDF object number (must be unique within the
document).generation
- the PDF generation number.public int getNumber()
public int getGeneration()
public java.lang.String getReference()
"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'
.public byte[] toPDFBytes() throws java.io.IOException
java.io.IOException
- if there is a problem writing to the byte array.public abstract byte[] getObjectBytes() throws java.io.IOException
java.io.IOException
- if there is a problem writing to the byte array.