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

## org.apache.fop.pdf
Class PDFDictionary

    java.lang.Object
      org.apache.fop.pdf.PDFObject
          org.apache.fop.pdf.PDFDictionary

All Implemented Interfaces:
  PDFWritable

Direct Known Subclasses:
  AbstractPDFStream, PDFEncoding, PDFFont, PDFFontDescriptor, PDFNames, PDFNameTreeNode, PDFNumberTreeNode, PDFResourceContext, PDFRoot, PDFStructElem, PDFStructTreeRoot, TransitionDictionary

public class PDFDictionary
extends PDFObject

Class representing a PDF dictionary object

Field Summary
`protected java.util.Map` | `entries` the entry map
`protected java.util.List` | `order` maintains the order of the entries added to the entry map.

Fields inherited from class org.apache.fop.pdf.PDFObject
`DATE_FORMAT, log`

Constructor Summary
`PDFDictionary()` Create a new dictionary object.
`PDFDictionary(PDFObject parent)` Create a new dictionary object.

Method Summary
`java.lang.Object` | `get(java.lang.String name)` Returns the value given a name.
`protected int` | `output(java.io.OutputStream stream)` Write the PDF represention of this object
`void` | `put(java.lang.String name, int value)` Puts a new name/value pair.
`void` | `put(java.lang.String name, java.lang.Object value)` Puts a new name/value pair.
`protected void` | `writeDictionary(java.io.OutputStream out, java.io.Writer writer)` Writes the contents of the dictionary to a StringBuffer.

Methods inherited from class org.apache.fop.pdf.PDFObject
`contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString`

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

Field Detail

### entries

    protected java.util.Map entries

  the entry map

### order

    protected java.util.List order

  maintains the order of the entries added to the entry map. Whenever you modify "entries", always make sure you adjust this list accordingly.

Constructor Detail

### PDFDictionary

    public PDFDictionary()

  Create a new dictionary object.

### PDFDictionary

    public PDFDictionary(PDFObject parent)

  Create a new dictionary object.

Parameters:
  `parent` - the object's parent if any

Method Detail

### put

    public void put(java.lang.String name,
                    java.lang.Object value)

  Puts a new name/value pair.

  Parameters:
    `name` - the name
    `value` - the value

### put

    public void put(java.lang.String name,
                    int value)

  Puts a new name/value pair.

  Parameters:
    `name` - the name
    `value` - the value

### get

    public java.lang.Object get(java.lang.String name)

  Returns the value given a name.

  Parameters:
    `name` - the name of the value
  Returns:
    the value or null, if there's no value with the given name.

### output

    protected int output(java.io.OutputStream stream)
                  throws java.io.IOException

  Write the PDF represention of this object

  Overrides:
    `output` in class `PDFObject`
  Parameters:
    `stream` - the stream to write the PDF to
  Returns:
    the number of bytes written
  Throws:
    `java.io.IOException` - if there is an error writing to the stream

### writeDictionary

    protected void writeDictionary(java.io.OutputStream out,
                                   java.io.Writer writer)
                            throws java.io.IOException

  Writes the contents of the dictionary to a StringBuffer.

  Parameters:
    `out` - the OutputStream (for binary content)
    `writer` - the Writer (for text content, wraps the above OutputStream)
  Throws:
    `java.io.IOException` - if an I/O error occurs

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

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.