Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.documents.contents
Class Contents

    java.lang.Object
      org.pdfclown.objects.PdfObjectWrapper<PdfDataObject>
          org.pdfclown.documents.contents.Contents

All Implemented Interfaces:
  Cloneable, Iterable<ContentObject>, Collection<ContentObject>, List<ContentObject>, IPdfObjectWrapper

    @PDF(value=PDF10)
    public final class Contents

extends PdfObjectWrapper<PdfDataObject>
implements List<ContentObject>

Content stream [PDF:1.6:3.7.1].

During its loading, this content stream is parsed and its instructions are exposed as a list; in case of modifications, it's user responsability to call the `flush()` method in order to serialize back the instructions into this content stream.

Since:
  0.0.4
Version:
  0.1.2, 12/21/12
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Method Summary
`boolean` | `add(ContentObject content)`
`void` | `add(int index, ContentObject content)`
`boolean` | `addAll(Collection<? extends ContentObject> contents)`
`boolean` | `addAll(int index, Collection<? extends ContentObject> contents)`
`void` | `clear()`
`Contents` | `clone(Document context)` Gets a clone of the object, registered inside the given document context.
`boolean` | `contains(Object content)`
`boolean` | `containsAll(Collection<?> contents)`
`boolean` | `equals(Object object)`
`void` | `flush()` Serializes the contents into the content stream.
`ContentObject` | `get(int index)`
`IContentContext` | `getContentContext()`
`int` | `hashCode()`
`int` | `indexOf(Object content)`
`boolean` | `isEmpty()`
`Iterator<ContentObject>` | `iterator()`
`int` | `lastIndexOf(Object content)`
`ListIterator<ContentObject>` | `listIterator()`
`ListIterator<ContentObject>` | `listIterator(int index)`
`ContentObject` | `remove(int index)`
`boolean` | `remove(Object content)`
`boolean` | `removeAll(Collection<?> contents)`
`boolean` | `retainAll(Collection<?> contents)`
`ContentObject` | `set(int index, ContentObject content)`
`int` | `size()`
`List<ContentObject>` | `subList(int fromIndex, int toIndex)`
`Object[]` | `toArray()`
`
`<T> T[]`
` | `toArray(T[] contents)`
`static Contents` | `wrap(PdfDirectObject baseObject, IContentContext contentContext)`

Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
`checkCompatibility, delete, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### wrap

    public static Contents wrap(PdfDirectObject baseObject,
                                IContentContext contentContext)

### clone

    public Contents clone(Document context)

  Description copied from class: `PdfObjectWrapper`
  Gets a clone of the object, registered inside the given document context.

  Overrides:
    `clone` in class `PdfObjectWrapper<PdfDataObject>`
  Parameters:
    `context` - Which document the clone has to be registered in.

### flush

    public void flush()

  Serializes the contents into the content stream.

### getContentContext

    public IContentContext getContentContext()

### add

    public void add(int index,
                    ContentObject content)

  Specified by:
    `add` in interface `List<ContentObject>`

### addAll

    public boolean addAll(int index,
                          Collection<? extends ContentObject> contents)

  Specified by:
    `addAll` in interface `List<ContentObject>`

### get

    public ContentObject get(int index)

  Specified by:
    `get` in interface `List<ContentObject>`

### indexOf

    public int indexOf(Object content)

  Specified by:
    `indexOf` in interface `List<ContentObject>`

### lastIndexOf

    public int lastIndexOf(Object content)

  Specified by:
    `lastIndexOf` in interface `List<ContentObject>`

### listIterator

    public ListIterator<ContentObject> listIterator()

  Specified by:
    `listIterator` in interface `List<ContentObject>`

### listIterator

    public ListIterator<ContentObject> listIterator(int index)

  Specified by:
    `listIterator` in interface `List<ContentObject>`

### remove

    public ContentObject remove(int index)

  Specified by:
    `remove` in interface `List<ContentObject>`

### set

    public ContentObject set(int index,
                             ContentObject content)

  Specified by:
    `set` in interface `List<ContentObject>`

### subList

    public List<ContentObject> subList(int fromIndex,
                                       int toIndex)

  Specified by:
    `subList` in interface `List<ContentObject>`

### add

    public boolean add(ContentObject content)

  Specified by:
    `add` in interface `Collection<ContentObject>`
  Specified by:
    `add` in interface `List<ContentObject>`

### addAll

    public boolean addAll(Collection<? extends ContentObject> contents)

  Specified by:
    `addAll` in interface `Collection<ContentObject>`
  Specified by:
    `addAll` in interface `List<ContentObject>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Collection<ContentObject>`
  Specified by:
    `clear` in interface `List<ContentObject>`

### contains

    public boolean contains(Object content)

  Specified by:
    `contains` in interface `Collection<ContentObject>`
  Specified by:
    `contains` in interface `List<ContentObject>`

### containsAll

    public boolean containsAll(Collection<?> contents)

  Specified by:
    `containsAll` in interface `Collection<ContentObject>`
  Specified by:
    `containsAll` in interface `List<ContentObject>`

### equals

    public boolean equals(Object object)

  Specified by:
    `equals` in interface `Collection<ContentObject>`
  Specified by:
    `equals` in interface `List<ContentObject>`
  Overrides:
    `equals` in class `PdfObjectWrapper<PdfDataObject>`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Collection<ContentObject>`
  Specified by:
    `hashCode` in interface `List<ContentObject>`
  Overrides:
    `hashCode` in class `Object`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection<ContentObject>`
  Specified by:
    `isEmpty` in interface `List<ContentObject>`

### remove

    public boolean remove(Object content)

  Specified by:
    `remove` in interface `Collection<ContentObject>`
  Specified by:
    `remove` in interface `List<ContentObject>`

### removeAll

    public boolean removeAll(Collection<?> contents)

  Specified by:
    `removeAll` in interface `Collection<ContentObject>`
  Specified by:
    `removeAll` in interface `List<ContentObject>`

### retainAll

    public boolean retainAll(Collection<?> contents)

  Specified by:
    `retainAll` in interface `Collection<ContentObject>`
  Specified by:
    `retainAll` in interface `List<ContentObject>`

### size

    public int size()

  Specified by:
    `size` in interface `Collection<ContentObject>`
  Specified by:
    `size` in interface `List<ContentObject>`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `Collection<ContentObject>`
  Specified by:
    `toArray` in interface `List<ContentObject>`

### toArray

    public <T> T[] toArray(T[] contents)

  Specified by:
    `toArray` in interface `Collection<ContentObject>`
  Specified by:
    `toArray` in interface `List<ContentObject>`

### iterator

    public Iterator<ContentObject> iterator()

  Specified by:
    `iterator` in interface `Iterable<ContentObject>`
  Specified by:
    `iterator` in interface `Collection<ContentObject>`
  Specified by:
    `iterator` in interface `List<ContentObject>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.