Top Description Methods
org.apache.pdfbox.pdmodel

public Interface ResourceCache

Known Direct Implementers
org.apache.pdfbox.pdmodel.DefaultResourceCache
Imports
org.apache.pdfbox.cos.COSObject, org.apache.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList, org.apache.pdfbox.pdmodel.font.PDFont, org.apache.pdfbox.pdmodel.graphics.PDXObject, org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace, org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern, org.apache.pdfbox.pdmodel.graphics.shading.PDShading, org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState

A document-wide cache for page resources.
Author
John Hewson

Method Summary

Modifier and TypeMethod and Description
public PDColorSpace

Returns:

the cached instance of the referenced colorspace, if available
getColorSpace
(COSObject
the indirect reference of the colorspace to be returned
indirect
)

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

public PDExtendedGraphicsState

Returns:

the cached instance of the referenced extended graphics state, if available
getExtGState
(COSObject
the indirect reference of the extended graphics state to be returned
indirect
)

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

public PDFont

Returns:

the cached instance of the referenced font, if available
getFont
(COSObject
the indirect reference of the font to be returned
indirect
)

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

public PDAbstractPattern

Returns:

the cached instance of the referenced pattern, if available
getPattern
(COSObject
the indirect reference of the pattern to be returned
indirect
)

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

public PDPropertyList

Returns:

the cached instance of the referenced property list, if available
getProperties
(COSObject
the indirect reference of the property list to be returned
indirect
)

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

public PDShading

Returns:

the cached instance of the referenced shading, if available
getShading
(COSObject
the indirect reference of the shading to be returned
indirect
)

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

public PDXObject

Returns:

the cached instance of the referenced XObject, if available
getXObject
(COSObject
the indirect reference of the XObject to be returned
indirect
)

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

public void
put(COSObject
the indirect reference of the font to be cached
indirect
,
PDFont
the font to be cached
font
)

Puts the given indirect font resource in the cache.

public void
put(COSObject
the indirect reference of the colorspace to be cached
indirect
,
PDColorSpace
the colorspace to be cached
colorSpace
)

Puts the given indirect color space resource in the cache.

public void
put(COSObject
the indirect reference of the extended graphics state to be cached
indirect
,
PDExtendedGraphicsState
the extended graphics state to be cached
extGState
)

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

public void
put(COSObject
the indirect reference of the shading to be cached
indirect
,
PDShading
the shading to be cached
shading
)

Puts the given indirect shading resource in the cache.

public void
put(COSObject
the indirect reference of the pattern to be cached
indirect
,
PDAbstractPattern
the pattern to be cached
pattern
)

Puts the given indirect pattern resource in the cache.

public void
put(COSObject
the indirect reference of the property list to be cached
indirect
,
PDPropertyList
the property list to be cached
propertyList
)

Puts the given indirect property list resource in the cache.

public void
put(COSObject
the indirect reference of the XObject to be cached
indirect
,
PDXObject
the XObject to be cached
xobject
)

Puts the given indirect XObject resource in the cache.

Method Detail

getColorSpaceback to summary
public PDColorSpace getColorSpace(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the colorspace to be returned

Returns:PDColorSpace

the cached instance of the referenced colorspace, if available

getExtGStateback to summary
public PDExtendedGraphicsState getExtGState(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the extended graphics state to be returned

Returns:PDExtendedGraphicsState

the cached instance of the referenced extended graphics state, if available

getFontback to summary
public PDFont getFont(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the font to be returned

Returns:PDFont

the cached instance of the referenced font, if available

getPatternback to summary
public PDAbstractPattern getPattern(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the pattern to be returned

Returns:PDAbstractPattern

the cached instance of the referenced pattern, if available

getPropertiesback to summary
public PDPropertyList getProperties(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the property list to be returned

Returns:PDPropertyList

the cached instance of the referenced property list, if available

getShadingback to summary
public PDShading getShading(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the shading to be returned

Returns:PDShading

the cached instance of the referenced shading, if available

getXObjectback to summary
public PDXObject getXObject(COSObject indirect)

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

Parameters
indirect:COSObject

the indirect reference of the XObject to be returned

Returns:PDXObject

the cached instance of the referenced XObject, if available

putback to summary
public void put(COSObject indirect, PDFont font)

Puts the given indirect font resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the font to be cached

font:PDFont

the font to be cached

putback to summary
public void put(COSObject indirect, PDColorSpace colorSpace)

Puts the given indirect color space resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the colorspace to be cached

colorSpace:PDColorSpace

the colorspace to be cached

putback to summary
public void put(COSObject indirect, PDExtendedGraphicsState extGState)

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

Parameters
indirect:COSObject

the indirect reference of the extended graphics state to be cached

extGState:PDExtendedGraphicsState

the extended graphics state to be cached

putback to summary
public void put(COSObject indirect, PDShading shading)

Puts the given indirect shading resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the shading to be cached

shading:PDShading

the shading to be cached

putback to summary
public void put(COSObject indirect, PDAbstractPattern pattern)

Puts the given indirect pattern resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the pattern to be cached

pattern:PDAbstractPattern

the pattern to be cached

putback to summary
public void put(COSObject indirect, PDPropertyList propertyList)

Puts the given indirect property list resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the property list to be cached

propertyList:PDPropertyList

the property list to be cached

putback to summary
public void put(COSObject indirect, PDXObject xobject)

Puts the given indirect XObject resource in the cache.

Parameters
indirect:COSObject

the indirect reference of the XObject to be cached

xobject:PDXObject

the XObject to be cached