public class PDFArray extends PDFObject
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
values
List holding the values of this array
|
DATE_FORMAT, log
Constructor and Description |
---|
PDFArray()
Create a new, empty array object with no parent.
|
PDFArray(PDFObject parent)
Create a new, empty array object
|
PDFArray(PDFObject parent,
java.util.Collection values)
Create an array object.
|
PDFArray(PDFObject parent,
double[] values)
Create an array object.
|
PDFArray(PDFObject parent,
int[] values)
Create an array object.
|
PDFArray(PDFObject parent,
java.lang.Object[] values)
Create the array object
|
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Adds a new value to the array.
|
void |
add(java.lang.Object obj)
Adds a new value to the array.
|
boolean |
contains(java.lang.Object obj)
Indicates whether the given object exists in the array.
|
java.lang.Object |
get(int index)
Gets an entry at a given location.
|
int |
length()
Returns the length of the array
|
protected int |
output(java.io.OutputStream stream)
Write the PDF represention of this object
|
void |
set(int index,
double value)
Sets an entry at a given location.
|
void |
set(int index,
java.lang.Object obj)
Sets an entry at a given location.
|
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString
public PDFArray(PDFObject parent)
parent
- the array's parent if anypublic PDFArray()
public PDFArray(PDFObject parent, int[] values)
parent
- the array's parent if anyvalues
- the actual array wrapped by this objectpublic PDFArray(PDFObject parent, double[] values)
parent
- the array's parent if anyvalues
- the actual array wrapped by this objectpublic PDFArray(PDFObject parent, java.util.Collection values)
parent
- the array's parent if anyvalues
- the actual values wrapped by this objectpublic PDFArray(PDFObject parent, java.lang.Object[] values)
parent
- the array's parent if anyvalues
- the actual array wrapped by this objectpublic boolean contains(java.lang.Object obj)
obj
- the object to look forpublic int length()
public void set(int index, java.lang.Object obj)
index
- the index of the value to setobj
- the new valuepublic void set(int index, double value)
index
- the index of the value to setvalue
- the new valuepublic java.lang.Object get(int index)
index
- the index of the value to setpublic void add(java.lang.Object obj)
obj
- the valuepublic void add(double value)
value
- the valueprotected int output(java.io.OutputStream stream) throws java.io.IOException
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.