Class CosArray


public class CosArray extends CosContainer
Represents a COS array as defined in section 3.2.5 of the PDF Reference Manual version 1.4.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
  • Field Summary

    Fields inherited from class com.adobe.internal.pdftoolkit.core.cos.CosObject

    DIRECT, INDIRECT, t_Array, t_Boolean, t_Dictionary, t_KeyAbsent, t_Name, t_Null, t_Numeric, t_ObjectRef, t_Stream, t_String
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int pos, CosObject cosObject)
    Inserts the specified element at the specified position in this list.
    boolean
    add(CosObject cosObject)
    Appends the specified CosObject to the end of this list.
    boolean
    addBoolean(boolean value)
    Creates an appropriate cos object and adds it to array.
    void
    addBoolean(int pos, boolean value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    addDouble(double value)
    Creates an appropriate cos object and adds it to array.
    void
    addDouble(int pos, double value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    addInt(int value)
    Creates an appropriate cos object and adds it to array.
    void
    addInt(int pos, int value)
    Creates an appropriate cos object and adds it to array at specified position.
    void
    addLong(int pos, long value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    addLong(long value)
    Creates an appropriate cos object and adds it to array.
    void
    addName(int pos, ASName value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    addName(ASName value)
    Creates an appropriate cos object and adds it to array.
    void
    addString(int pos, ASString value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    Creates an appropriate cos object and adds it to array.
    void
    addText(int pos, String value)
    Creates an appropriate cos object and adds it to array at specified position.
    boolean
    addText(String value)
    Creates an appropriate cos object and adds it to array.
    void
    Removes all elements from the CosArray.
    boolean
    Returns true if this array contains the object passed, else false.
    boolean
    This method checks the inside data of CosArray and returns true if they are clone of each other.
    void
    extendIfNecessaryAndSet(int pos, CosObject cosObject)
    Adds the CosObject at the specified position in this list.
    int
    Returns the index of name object with the same name as passed.
    int
    Looks for the CosString in the array.
    get(int pos)
    Obtains the specified element from the array.
    byte[][]
    getArrayBytes() presumes that the CosArray contains string values only and delivers an array of array of byte values.
    double[]
    getArrayDouble() presumes that the CosArray contains numeric values only and delivers an array of double values.
    double[]
    getArrayDouble(int start, int length)
    getArrayDouble() presumes that the CosArray contains numeric values only and delivers an array of double values.
    int[]
    getArrayInt() presumes that the CosArray contains numeric values only and delivers an array of integer values.
    long[]
    getArrayInt() presumes that the CosArray contains numeric values only and delivers an array of integer values.
    getArrayName() presumes that the CosArray contains ASName values only and delivers an array of ASName values.
    boolean
    getBoolean(int pos)
    It assumes that the object at index "pos" is of type CosBoolean and returns it's value.
    getCosArray(int pos)
    It assumes that the object at index "pos" is of type CosArray and returns it's value.
    It assumes that the object at index "pos" is of type CosDictionary and returns it's value.
    getCosStream(int pos)
    It assumes that the object at index "pos" is of type CosStream and returns it's value.
    getCosString(int pos)
    It assumes that the object at index "pos" is of type CosString and returns it's value.
    double
    getDouble(int pos)
    It assumes that the object at index "pos" is of type CosNumeric and returns it's value.
    getHexString(int pos)
    It assumes that the object at index "pos" is of type CosString and returns it's value.
    int
    getInt(int pos)
    It assumes that the object at index "pos" is of type CosNumeric and returns it's value.
    long
    getLong(int pos)
    It assumes that the object at index "pos" is of type CosNumeric and returns it's value.
    getName(int pos)
    It assumes that the object at index "pos" is of type CosName and returns it's value.
    getStream(int pos)
    This gets a slice of the underlying InputByteStream.
    getString(int pos)
    It assumes that the object at index "pos" is of type CosString and returns it's value.
    getText(int pos)
    It assumes that the object at index "pos" is of type CosString and returns it's value.
    int
    return the type of this CosObject
    int
    getType(int pos)
    Returns the type of the value at the given position
     
     
    boolean
    Tests whether the array contains any elements.
    Returns an iterator over the elements of the array.
    Returns a list iterator over the elements of the array.
    remove(int index)
    Removes the element at the specified position in this list.
    boolean
    remove(CosObject cosObject)
    Removes all instances of the specified object from the array.
    boolean
    set(int pos, CosObject cosObject)
    Adds the CosObject at the specified position in this list.
    boolean
    setBoolean(int pos, boolean value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setDouble(int pos, double value)
    Creates an appropriate cos object and sets it to array at specified position.
    void
    setEncryptionState(boolean state)
    Set the specified encryption state for all strings and streams in an array recursively
    boolean
    setInt(int pos, int value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setLong(int pos, long value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setName(int pos, ASName value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setName(int pos, String value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setString(int pos, ASString value)
    Creates an appropriate cos object and sets it to array at specified position.
    boolean
    setText(int pos, String value)
    Creates an appropriate cos object and sets it to array at specified position.
    int
    Returns the number of elements in the array.
    splitBefore(int pos)
    Returns a new array containing all the values before "pos" index in current array.

    Methods inherited from class com.adobe.internal.pdftoolkit.core.cos.CosContainer

    findObjPos, markNotDirty

    Methods inherited from class java.lang.Object

    getClass, hashCode, notify, notifyAll, wait, wait, wait