com.etymon.pj.object
Class PjReference
java.lang.Object
|
+--com.etymon.pj.object.BaseObject
|
+--com.etymon.pj.object.PjObject
|
+--com.etymon.pj.object.PjReference
- All Implemented Interfaces:
- java.lang.Cloneable
- public class PjReference
- extends PjObject
A representation of the PDF reference type.
|
Method Summary |
java.lang.Object |
clone()
Returns a deep copy of this object. |
boolean |
equals(java.lang.Object obj)
Compares two PjReference objects for equality. |
PjNumber |
getGenNumber()
Returns the generation number referenced by this PDF reference. |
PjNumber |
getObjNumber()
Returns the object number referenced by this PDF reference. |
int |
hashCode()
Returns a hash code value for the object. |
long |
writePdf(java.io.OutputStream os)
Writes this PDF reference object to a stream in PDF format. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PjReference
public PjReference(PjNumber obj)
- Creates a PDF reference object.
- Parameters:
obj - the object number for the new reference.
PjReference
public PjReference(PjNumber obj,
PjNumber gen)
- Creates a PDF reference object.
- Parameters:
obj - the object number for the new reference.gen - the generation number for the new reference.
getObjNumber
public PjNumber getObjNumber()
- Returns the object number referenced by this PDF reference.
- Returns:
- the object number within this PDF reference.
getGenNumber
public PjNumber getGenNumber()
- Returns the generation number referenced by this PDF reference.
- Returns:
- the generation number within this PDF reference.
writePdf
public long writePdf(java.io.OutputStream os)
throws java.io.IOException
- Writes this PDF reference object to a stream in PDF format.
- Overrides:
writePdf in class BaseObject
- Parameters:
os - the stream to write to.- Returns:
- the number of bytes written.
- Throws:
java.io.IOException - if an I/O error occurs.
clone
public java.lang.Object clone()
- Returns a deep copy of this object.
- Overrides:
clone in class BaseObject
- Returns:
- a deep copy of this object.
equals
public boolean equals(java.lang.Object obj)
- Compares two PjReference objects for equality.
- Overrides:
equals in class java.lang.Object
- Parameters:
obj - the reference object to compare to.- Returns:
- true if this object is the same as obj, false
otherwise.
hashCode
public int hashCode()
- Returns a hash code value for the object.
- Overrides:
hashCode in class java.lang.Object
- Returns:
- a hashcode value for this object.