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 Default 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.
`default PDColorSpace` `removeColorSpace(COSObject indirect)` Removes the given indirect color space resource from the cache.
`default PDExtendedGraphicsState` `removeExtState(COSObject indirect)` Removes the given indirect extended graphics state resource from the cache.
`default PDFont` `removeFont(COSObject indirect)` Removes the given indirect font resource from the cache.
`default PDAbstractPattern` `removePattern(COSObject indirect)` Removes the given indirect pattern resource from the cache.
`default PDPropertyList` `removeProperties(COSObject indirect)` Removes the given indirect property list resource from the cache.
`default PDShading` `removeShading(COSObject indirect)` Removes the given indirect shading resource from the cache.
`default PDXObject` `removeXObject(COSObject indirect)` Removes the given indirect XObject resource from the cache.

### Method Detail

#### getFont

    PDFont getFont(COSObject indirect)

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

Parameters:
  `indirect` - the indirect reference of the font to be returned
Returns:
  the cached instance of the referenced font, if available

#### getColorSpace

    PDColorSpace getColorSpace(COSObject indirect)

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

Parameters:
  `indirect` - the indirect reference of the colorspace to be returned
Returns:
  the cached instance of the referenced colorspace, if available

#### 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 reference of the extended graphics state to be returned
Returns:
  the cached instance of the referenced extended graphics state, if available

#### getShading

    PDShading getShading(COSObject indirect)

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

Parameters:
  `indirect` - the indirect reference of the shading to be returned
Returns:
  the cached instance of the referenced shading, if available

#### getPattern

    PDAbstractPattern getPattern(COSObject indirect)

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

Parameters:
  `indirect` - the indirect reference of the pattern to be returned
Returns:
  the cached instance of the referenced pattern, if available

#### 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 reference of the property list to be returned
Returns:
  the cached instance of the referenced property list, if available

#### getXObject

    PDXObject getXObject(COSObject indirect)

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

Parameters:
  `indirect` - the indirect reference of the XObject to be returned
Returns:
  the cached instance of the referenced XObject, if available

#### put

    void put(COSObject indirect,
             PDFont font)

Puts the given indirect font resource in the cache.

Parameters:
  `indirect` - the indirect reference of the font to be cached
  `font` - the font to be cached

#### put

    void put(COSObject indirect,
             PDColorSpace colorSpace)

Puts the given indirect color space resource in the cache.

Parameters:
  `indirect` - the indirect reference of the colorspace to be cached
  `colorSpace` - the colorspace to be cached

#### put

    void put(COSObject indirect,
             PDExtendedGraphicsState extGState)

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

Parameters:
  `indirect` - the indirect reference of the extended graphics state to be cached
  `extGState` - the extended graphics state to be cached

#### put

    void put(COSObject indirect,
             PDShading shading)

Puts the given indirect shading resource in the cache.

Parameters:
  `indirect` - the indirect reference of the shading to be cached
  `shading` - the shading to be cached

#### put

    void put(COSObject indirect,
             PDAbstractPattern pattern)

Puts the given indirect pattern resource in the cache.

Parameters:
  `indirect` - the indirect reference of the pattern to be cached
  `pattern` - the pattern to be cached

#### put

    void put(COSObject indirect,
             PDPropertyList propertyList)

Puts the given indirect property list resource in the cache.

Parameters:
  `indirect` - the indirect reference of the property list to be cached
  `propertyList` - the property list to be cached

#### put

    void put(COSObject indirect,
             PDXObject xobject)

Puts the given indirect XObject resource in the cache.

Parameters:
  `indirect` - the indirect reference of the XObject to be cached
  `xobject` - the XObject to be cached

#### removeColorSpace

    default PDColorSpace removeColorSpace(COSObject indirect)

Removes the given indirect color space resource from the cache.

Parameters:
  `indirect` - the indirect reference of the color space to be removed
Returns:
  the removed resource if present

#### removeExtState

    default PDExtendedGraphicsState removeExtState(COSObject indirect)

Removes the given indirect extended graphics state resource from the cache.

Parameters:
  `indirect` - the indirect reference of the extended graphics state to be removed
Returns:
  the removed resource if present

#### removeFont

    default PDFont removeFont(COSObject indirect)

Removes the given indirect font resource from the cache.

Parameters:
  `indirect` - the indirect reference of the font to be removed
Returns:
  the removed resource if present

#### removeShading

    default PDShading removeShading(COSObject indirect)

Removes the given indirect shading resource from the cache.

Parameters:
  `indirect` - the indirect reference of the shading to be removed
Returns:
  the removed resource if present

#### removePattern

    default PDAbstractPattern removePattern(COSObject indirect)

Removes the given indirect pattern resource from the cache.

Parameters:
  `indirect` - the indirect reference of the pattern to be removed
Returns:
  the removed resource if present

#### removeProperties

    default PDPropertyList removeProperties(COSObject indirect)

Removes the given indirect property list resource from the cache.

Parameters:
  `indirect` - the indirect reference of the property list to be removed
Returns:
  the removed resource if present

#### removeXObject

    default PDXObject removeXObject(COSObject indirect)

Removes the given indirect XObject resource from the cache.

Parameters:
  `indirect` - the indirect reference of the XObject to be removed
Returns:
  the removed resource if present