org.apache.pdfbox.pdmodel

## Interface ResourceCache

All Known Implementing Classes:
  DefaultResourceCache

    public interface ResourceCache

A document-wide cache for page resources.

Author:
  John Hewson

### Method Summary

All Methods Instance Methods Abstract Methods
`PDColorSpace` `getColorSpace(COSObject indirect)` Returns the color space resource for the given indirect object, if it is in the cache.
`PDExtendedGraphicsState` `getExtGState(COSObject indirect)` Returns the extended graphics state resource for the given indirect object, if it is in the cache.
`PDFont` `getFont(COSObject indirect)` Returns the font resource for the given indirect object, if it is in the cache.
`PDAbstractPattern` `getPattern(COSObject indirect)` Returns the pattern resource for the given indirect object, if it is in the cache.
`PDPropertyList` `getProperties(COSObject indirect)` Returns the property list resource for the given indirect object, if it is in the cache.
`PDShading` `getShading(COSObject indirect)` Returns the shading resource for the given indirect object, if it is in the cache.
`PDXObject` `getXObject(COSObject indirect)` Returns the XObject resource for the given indirect object, if it is in the cache.
`void` `put(COSObject indirect, PDAbstractPattern pattern)` Puts the given indirect pattern resource in the cache.
`void` `put(COSObject indirect, PDColorSpace colorSpace)` Puts the given indirect color space resource in the cache.
`void` `put(COSObject indirect, PDExtendedGraphicsState extGState)` Puts the given indirect extended graphics state resource in the cache.
`void` `put(COSObject indirect, PDFont font)` Puts the given indirect font resource in the cache.
`void` `put(COSObject indirect, PDPropertyList propertyList)` Puts the given indirect property list resource in the cache.
`void` `put(COSObject indirect, PDShading shading)` Puts the given indirect shading resource in the cache.
`void` `put(COSObject indirect, PDXObject xobject)` Puts the given indirect XObject resource in the cache.

### Method Detail

#### getFont

    PDFont getFont(COSObject indirect)
            throws IOException

Returns the font resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the font resource of the given indirect object.
Throws:
  `IOException` - if something went wrong.

#### getColorSpace

    PDColorSpace getColorSpace(COSObject indirect)
                        throws IOException

Returns the color space resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the color space resource of the given indirect object.
Throws:
  `IOException` - if something went wrong.

#### getExtGState

    PDExtendedGraphicsState getExtGState(COSObject indirect)

Returns the extended graphics state resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the extended graphics resource of the given indirect object.

#### getShading

    PDShading getShading(COSObject indirect)
                  throws IOException

Returns the shading resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the shading resource of the given indirect object.
Throws:
  `IOException` - if something went wrong.

#### getPattern

    PDAbstractPattern getPattern(COSObject indirect)
                          throws IOException

Returns the pattern resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the pattern resource of the given indirect object.
Throws:
  `IOException` - if something went wrong.

#### getProperties

    PDPropertyList getProperties(COSObject indirect)

Returns the property list resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the property list resource of the given indirect object.

#### getXObject

    PDXObject getXObject(COSObject indirect)
                  throws IOException

Returns the XObject resource for the given indirect object, if it is in the cache.

Parameters:
  `indirect` - the indirect object
Returns:
  the XObject resource of the given indirect object.
Throws:
  `IOException` - if something went wrong.

#### put

    void put(COSObject indirect,
             PDFont font)
      throws IOException

Puts the given indirect font resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `font` - the font resource.
Throws:
  `IOException` - if something went wrong.

#### put

    void put(COSObject indirect,
             PDColorSpace colorSpace)
      throws IOException

Puts the given indirect color space resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `colorSpace` - the color space resource.
Throws:
  `IOException` - if something went wrong.

#### put

    void put(COSObject indirect,
             PDExtendedGraphicsState extGState)

Puts the given indirect extended graphics state resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `extGState` - the extended graphics state resource.

#### put

    void put(COSObject indirect,
             PDShading shading)
      throws IOException

Puts the given indirect shading resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `shading` - the shading resource.
Throws:
  `IOException` - if something went wrong.

#### put

    void put(COSObject indirect,
             PDAbstractPattern pattern)
      throws IOException

Puts the given indirect pattern resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `pattern` - the pattern resource.
Throws:
  `IOException` - if something went wrong.

#### put

    void put(COSObject indirect,
             PDPropertyList propertyList)

Puts the given indirect property list resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `propertyList` - the property list resource.

#### put

    void put(COSObject indirect,
             PDXObject xobject)
      throws IOException

Puts the given indirect XObject resource in the cache.

Parameters:
  `indirect` - the indirect object of the resource.
  `xobject` - the XObject resource.
Throws:
  `IOException` - if something went wrong.