Save This Page
Home » pdfbox-1.1.0-src » org.apache.pdfbox.cos » [javadoc | source]
org.apache.pdfbox.cos
public class: COSArray [javadoc | source]
java.lang.Object
   org.apache.pdfbox.cos.COSBase
      org.apache.pdfbox.cos.COSArray

All Implemented Interfaces:
    COSObjectable

An array of PDFBase objects as part of the PDF document.
Constructor:
 public COSArray() 
Method from org.apache.pdfbox.cos.COSArray Summary:
accept,   add,   add,   add,   addAll,   addAll,   addAll,   clear,   get,   getInt,   getInt,   getName,   getName,   getObject,   getString,   getString,   growToSize,   growToSize,   indexOf,   indexOfObject,   iterator,   remove,   remove,   removeAll,   removeObject,   retainAll,   set,   set,   set,   setFloatArray,   setInt,   setName,   setString,   size,   toFloatArray,   toList,   toString
Methods from org.apache.pdfbox.cos.COSBase:
accept,   getCOSObject,   getFilterManager
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.cos.COSArray Detail:
 public Object accept(ICOSVisitor visitor) throws COSVisitorException 
    visitor pattern double dispatch method.
 public  void add(COSBase object) 
    This will add an object to the array.
 public  void add(COSObjectable object) 
    This will add an object to the array.
 public  void add(int i,
    COSBase object) 
    Add the specified object at the ith location and push the rest to the right.
 public  void addAll(Collection<COSBase> objectsList) 
    This will add an object to the array.
 public  void addAll(COSArray objectList) 
    This will add all objects to this array.
 public  void addAll(int i,
    Collection<COSBase> objectList) 
    Add the specified object at the ith location and push the rest to the right.
 public  void clear() 
    This will remove all of the objects in the collection.
 public COSBase get(int index) 
    This will get an object from the array. This will NOT derefernce the COS object.
 public int getInt(int index) 
    Get the value of the array as an integer.
 public int getInt(int index,
    int defaultValue) 
    Get the value of the array as an integer, return the default if it does not exist.
 public String getName(int index) 
    Get the value of the array as a string.
 public String getName(int index,
    String defaultValue) 
    Get an entry in the array that is expected to be a COSName.
 public COSBase getObject(int index) 
    This will get an object from the array. This will dereference the object. If the object is COSNull then null will be returned.
 public String getString(int index) 
    Get the value of the array as a string.
 public String getString(int index,
    String defaultValue) 
    Get an entry in the array that is expected to be a COSName.
 public  void growToSize(int size) 
    This will add null values until the size of the array is at least as large as the parameter. If the array is already larger than the parameter then nothing is done.
 public  void growToSize(int size,
    COSBase object) 
    This will add the object until the size of the array is at least as large as the parameter. If the array is already larger than the parameter then nothing is done.
 public int indexOf(COSBase object) 
    This will return the index of the entry or -1 if it is not found.
 public int indexOfObject(COSBase object) 
    This will return the index of the entry or -1 if it is not found. This method will also find references to indirect objects.
 public Iterator<COSBase> iterator() 
    Get access to the list.
 public COSBase remove(int i) 
    This will remove an element from the array.
 public boolean remove(COSBase o) 
    This will remove an element from the array.
 public  void removeAll(Collection<COSBase> objectsList) 
    This will remove all of the objects in the collection.
 public boolean removeObject(COSBase o) 
    This will remove an element from the array. This method will also remove a reference to the object.
 public  void retainAll(Collection<COSBase> objectsList) 
    This will retain all of the objects in the collection.
 public  void set(int index,
    COSBase object) 
    This will set an object at a specific index.
 public  void set(int index,
    int intVal) 
    This will set an object at a specific index.
 public  void set(int index,
    COSObjectable object) 
    This will set an object at a specific index.
 public  void setFloatArray(float[] value) 
    Clear the current contents of the COSArray and set it with the float[].
 public  void setInt(int index,
    int value) 
    Set the value in the array as an integer.
 public  void setName(int index,
    String name) 
    Set the value in the array as a name.
 public  void setString(int index,
    String string) 
    Set the value in the array as a string.
 public int size() 
    This will get the size of this array.
 public float[] toFloatArray() 
    This will take an COSArray of numbers and convert it to a float[].
 public List<COSBase> toList() 
    Return contents of COSArray as a Java List.
 public String toString() 
    {@inheritDoc}