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.tokens
Class XRefStream

    java.lang.Object
      org.pdfclown.objects.PdfObject
          org.pdfclown.objects.PdfDataObject
              org.pdfclown.objects.PdfStream
                  org.pdfclown.tokens.XRefStream

All Implemented Interfaces:
  Cloneable, Map<Integer,XRefEntry>, IFileResource, IVisitable

    public final class XRefStream

extends PdfStream
implements Map<Integer,XRefEntry>

Cross-reference stream containing cross-reference information [PDF:1.6:3.4.7].

It is alternative to the classic cross-reference table.

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

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

Constructor Summary
`XRefStream(File file)`
`XRefStream(PdfDictionary header, IBuffer body)`

Method Summary
`PdfObject` | `accept(IVisitor visitor, Object data)` Accepts a visit.
`void` | `clear()`
`boolean` | `containsKey(Object key)`
`boolean` | `containsValue(Object value)`
`Set<Map.Entry<Integer,XRefEntry>>` | `entrySet()`
`XRefEntry` | `get(Object key)`
`int` | `getLinkedStreamOffset()` Gets the byte offset from the beginning of the file to the beginning of the previous cross-reference stream.
`boolean` | `isEmpty()`
`Set<Integer>` | `keySet()`
`XRefEntry` | `put(Integer key, XRefEntry value)`
`void` | `putAll(Map<? extends Integer,? extends XRefEntry> entries)`
`XRefEntry` | `remove(Object key)`
`int` | `size()`
`Collection<XRefEntry>` | `values()`
`void` | `writeTo(IOutputStream stream, File context)` Serializes this object to the specified stream.

Methods inherited from class org.pdfclown.objects.PdfStream
`clone, getBody, getBody, getDataFile, getFilter, getHeader, getParameters, getParent, isUpdateable, isUpdated, isVirtual, setDataFile, setDataFile, setFilter, setParameters, setUpdateable, setUpdated, setVirtual, swap`

Methods inherited from class org.pdfclown.objects.PdfObject
`clone, clone, getContainer, getDataContainer, getFile, getIndirectObject, getReference, resolve, resolve, unresolve, unresolve, update`

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

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### XRefStream

    public XRefStream(File file)

### XRefStream

    public XRefStream(PdfDictionary header,
                      IBuffer body)

Method Detail

### accept

    public PdfObject accept(IVisitor visitor,
                            Object data)

  Description copied from interface: `IVisitable`
  Accepts a visit.

  Specified by:
    `accept` in interface `IVisitable`
  Overrides:
    `accept` in class `PdfStream`
  Parameters:
    `visitor` - Visiting object.
    `data` - Supplemental data.
  Returns:
    Result object.

### getLinkedStreamOffset

    public int getLinkedStreamOffset()

  Gets the byte offset from the beginning of the file to the beginning of the previous cross-reference stream.

  Returns:
    `-1` in case no linked stream exists.

### writeTo

    public void writeTo(IOutputStream stream,
                        File context)

  Description copied from class: `PdfObject`
  Serializes this object to the specified stream.

  Overrides:
    `writeTo` in class `PdfStream`
  Parameters:
    `stream` - Target stream.
    `context` - File context.

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map<Integer,XRefEntry>`

### containsKey

    public boolean containsKey(Object key)

  Specified by:
    `containsKey` in interface `Map<Integer,XRefEntry>`

### containsValue

    public boolean containsValue(Object value)

  Specified by:
    `containsValue` in interface `Map<Integer,XRefEntry>`

### entrySet

    public Set<Map.Entry<Integer,XRefEntry>> entrySet()

  Specified by:
    `entrySet` in interface `Map<Integer,XRefEntry>`

### get

    public XRefEntry get(Object key)

  Specified by:
    `get` in interface `Map<Integer,XRefEntry>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Map<Integer,XRefEntry>`

### keySet

    public Set<Integer> keySet()

  Specified by:
    `keySet` in interface `Map<Integer,XRefEntry>`

### put

    public XRefEntry put(Integer key,
                         XRefEntry value)

  Specified by:
    `put` in interface `Map<Integer,XRefEntry>`

### putAll

    public void putAll(Map<? extends Integer,? extends XRefEntry> entries)

  Specified by:
    `putAll` in interface `Map<Integer,XRefEntry>`

### remove

    public XRefEntry remove(Object key)

  Specified by:
    `remove` in interface `Map<Integer,XRefEntry>`

### size

    public int size()

  Specified by:
    `size` in interface `Map<Integer,XRefEntry>`

### values

    public Collection<XRefEntry> values()

  Specified by:
    `values` in interface `Map<Integer,XRefEntry>`

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.