com.etymon.pj.object
Class PjArray
java.lang.Object
|
+--com.etymon.pj.object.BaseObject
|
+--com.etymon.pj.object.PjObject
|
+--com.etymon.pj.object.PjArray
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- PjProcSet, PjRectangle
- public class PjArray
- extends PjObject
A representation of the PDF array type.
|
Field Summary |
protected java.util.Vector |
_v
|
|
Constructor Summary |
PjArray()
Creates an empty array. |
PjArray(java.util.Vector v)
Creates an array as a wrapper around a Vector. |
|
Method Summary |
java.lang.Object |
clone()
Returns a deep copy of this object. |
protected java.util.Vector |
cloneVector()
|
java.util.Vector |
getVector()
Returns the Vector used to represent this array. |
void |
renumber(java.util.Hashtable map)
Renumbers object references within this object. |
long |
writePdf(java.io.OutputStream os)
Writes this array to a stream in PDF format. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_v
protected java.util.Vector _v
PjArray
public PjArray()
- Creates an empty array.
PjArray
public PjArray(java.util.Vector v)
- Creates an array as a wrapper around a Vector.
- Parameters:
v - the Vector to use for this array.
getVector
public java.util.Vector getVector()
- Returns the Vector used to represent this array.
- Returns:
- the Vector used to represent this array.
writePdf
public long writePdf(java.io.OutputStream os)
throws java.io.IOException
- Writes this array 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()
throws java.lang.CloneNotSupportedException
- Returns a deep copy of this object.
- Overrides:
clone in class BaseObject
- Returns:
- a deep copy of this object.
- Throws:
java.lang.CloneNotSupportedException - if the instance can not be cloned.
cloneVector
protected java.util.Vector cloneVector()
throws java.lang.CloneNotSupportedException
renumber
public void renumber(java.util.Hashtable map)
- Renumbers object references within this object. This
method calls itself recursively to comprehensively renumber
all objects contained within this object.
- Overrides:
renumber in class PjObject
- Parameters:
map - the table of object number mappings. Each
object number is looked up by key in the hash table, and
the associated value is assigned as the new object number.
The map hash table should consist of PjNumber keys and
PjReference values.