Package | org.purepdf.pdf |
Class | public class PdfArray |
Inheritance | PdfArray PdfObject it.sephiroth.utils.ObjectHash |
Subclasses | PdfBorderArray, PdfColor, PdfDashPattern, PdfDestination, PdfRectangle |
Property | Defined By | ||
---|---|---|---|
isEmpty : Boolean [read-only] | PdfArray | ||
size : int [read-only] | PdfArray |
Property | Defined By | ||
---|---|---|---|
arrayList : Vector.<PdfObject> | PdfArray | ||
bytes : Bytes | PdfObject | ||
indRef : PRIndirectReference | PdfObject | ||
type : int | PdfObject |
Method | Defined By | ||
---|---|---|---|
PdfArray(object:Object = null)
Supported constructor types:
PdfObject
Vector.<Number>
Vector.<int>
| PdfArray | ||
Add a PdfObject to the end of the PdfArray
| PdfArray | ||
add2(values:Vector.<Number>):Boolean
Add an array of numbers to the end of the PdfArray
| PdfArray | ||
add3(values:Vector.<int>):Boolean
Add and array of integer to the end of the PdfArray
| PdfArray | ||
PdfArray | |||
canBeInObjStm():Boolean
Whether this object can be contained in an object stream. | PdfObject | ||
Check if the PdfArray already contains a certain PdfObject
| PdfArray | ||
dispose():void | PdfObject | ||
getArrayList():Vector.<PdfObject> Deprecated: Deprecated | PdfArray | ||
getAsNumber(idx:int):PdfNumber
Returns a PdfObject as a PdfNumber,
resolving indirect references. | PdfArray | ||
PdfObject | |||
getDirectObject(idx:int):PdfObject
Returns the PdfObject with the specified index, resolving
a possible indirect reference to a direct object. | PdfArray | ||
PdfObject | |||
getPdfObject(idx:int):PdfObject
Returns the PdfObject at the specified index
| PdfArray | ||
getType():int | PdfObject | ||
isArray():Boolean | PdfObject | ||
isBoolean():Boolean | PdfObject | ||
isDictionary():Boolean | PdfObject | ||
isIndirect():Boolean | PdfObject | ||
isName():Boolean | PdfObject | ||
isNull():Boolean | PdfObject | ||
isNumber():Boolean | PdfObject | ||
isStream():Boolean
Checks if this PdfObject is of the type PdfStream
| PdfObject | ||
isString():Boolean | PdfObject | ||
listIterator():Iterator
Returns the list iterator for the array. | PdfArray | ||
Remove the element at the specified position from the array. | PdfArray | ||
setIndRef(indRef:PRIndirectReference):void
Set the indirect reference
| PdfObject | ||
[override]
Writes the PDF representation of this PdfArray as an array
of byte to the specified OutputStream. | PdfArray | ||
toString():String [override] | PdfArray |
arrayList | property |
protected var arrayList:Vector.<PdfObject>
isEmpty | property |
isEmpty:Boolean
[read-only] public function get isEmpty():Boolean
size | property |
size:int
[read-only] public function get size():int
PdfArray | () | Constructor |
public function PdfArray(object:Object = null)
Supported constructor types:
object:Object (default = null )
|
add | () | method |
public function add(object:PdfObject):uint
Add a PdfObject to the end of the PdfArray
Parameters
object:PdfObject |
uint |
add2 | () | method |
public function add2(values:Vector.<Number>):Boolean
Add an array of numbers to the end of the PdfArray
Parameters
values:Vector.<Number> |
Boolean |
add3 | () | method |
public function add3(values:Vector.<int>):Boolean
Add and array of integer to the end of the PdfArray
Parameters
values:Vector.<int> |
Boolean |
addFirst | () | method |
contains | () | method |
public function contains(object:PdfObject):Boolean
Check if the PdfArray already contains a certain PdfObject
Parameters
object:PdfObject |
Boolean — |
getArrayList | () | method |
getAsNumber | () | method |
public function getAsNumber(idx:int):PdfNumber
Returns a PdfObject
as a PdfNumber
,
resolving indirect references.
The object corresponding to the specified index is retrieved and
resolved to a direct object.
If it is a PdfNumber
, it is cast down and returned as such.
Otherwise null
is returned.
Parameters
idx:int — The index of the PdfObject to be returned
|
PdfNumber — the corresponding PdfNumber object,
or null
|
getDirectObject | () | method |
public function getDirectObject(idx:int):PdfObject
Returns the PdfObject
with the specified index, resolving
a possible indirect reference to a direct object.
Thus this method will never return a PdfIndirectReference
object.
Parameters
idx:int — The index of the PdfObject to be returned
|
PdfObject — A direct PdfObject or null
|
getPdfObject | () | method |
public function getPdfObject(idx:int):PdfObject
Returns the PdfObject at the specified index
Parameters
idx:int |
PdfObject |
listIterator | () | method |
public function listIterator():Iterator
Returns the list iterator for the array.
ReturnsIterator — a ListIterator
|
remove | () | method |
public function remove(idx:int):PdfObject
Remove the element at the specified position from the array. Shifts any subsequent elements to the left (subtracts one from their indices).
Parameters
idx:int — The index of the element to be removed.
|
PdfObject |
IndexOutOfBoundsError
|
toPdf | () | method |
override public function toPdf(writer:PdfWriter, os:IOutputStream):void
Writes the PDF representation of this PdfArray
as an array
of byte
to the specified OutputStream
.
Parameters
writer:PdfWriter — for backwards compatibility
| |
os:IOutputStream — the OutputStream to write the bytes to.
|
toString | () | method |
override public function toString():String
ReturnsString |