public abstract class PdfObject
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
PdfObject() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a shallow copy of this instance.
|
boolean |
equals(java.lang.Object obj)
Compares this instance with another PDF object for equality.
|
PdfObject |
filter(PdfObjectFilter f)
Filter this object recursively through
PdfObjectFilter . |
protected PdfObject |
filterContents(PdfObjectFilter f)
Second stage filtering, called by
filter(PdfObjectFilter) . |
int |
hashCode()
Returns a hash code for this object.
|
java.lang.String |
toString()
Returns a string representation of this instance in PDF
format.
|
protected abstract int |
writePdf(PdfWriter w,
boolean spacing)
Writes this object in PDF format.
|
public PdfObject filter(PdfObjectFilter f) throws PdfFormatException
PdfObjectFilter
. The filtered object is
returned.filter
- the PdfObjectFilter
instance.PdfFormatException
protected PdfObject filterContents(PdfObjectFilter f) throws PdfFormatException
filter(PdfObjectFilter)
. This is
only called if PdfObjectFilter.preFilter(PdfObject)
did not return
null
.filter
- the PdfObjectFilter
instance.PdfFormatException
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare this instance with.true
if the PDF objects are equal.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract int writePdf(PdfWriter w, boolean spacing) throws java.io.IOException
w
- the PdfWriter
to write to.spacing
- specifies whether to add white-space before
the object. A value of true
enables the
addition of white-space. If the object begins with a PDF
delimiter, then this option is ignored and no white-space
is written.java.io.IOException