java.lang.Object
org.sejda.sambox.pdmodel.DefaultResourceCache
- All Implemented Interfaces:
ResourceCache
A resource cached based on SoftReference, retains resources until memory pressure causes them to be garbage
collected.
- Author:
- John Hewson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cacheReturns the color space resource for the given key object, if it is in the cache.getExtGState(COSObjectKey key) Returns the external graphics state resource for the given key object, if it is in the cache.getFont(COSObjectKey key) Returns the font resource for the given key object, if it is in the cache.getPattern(COSObjectKey key) Returns the pattern resource for the given key object, if it is in the cache.Returns the property list resource for the given key object, if it is in the cache.getShading(COSObjectKey key) Returns the shading resource for the given key object, if it is in the cache.getXObject(COSObjectKey key) Returns the XObject resource for the given key object, if it is in the cache.voidput(COSObjectKey key, PDPropertyList propertyList) Puts the given key property list resource in the cache.voidput(COSObjectKey key, PDFont font) Puts the given key font resource in the cache.voidput(COSObjectKey key, PDColorSpace colorSpace) Puts the given key color space resource in the cache.voidput(COSObjectKey key, PDAbstractPattern pattern) Puts the given key pattern resource in the cache.voidput(COSObjectKey key, PDXObject xobject) Puts the given key XObject resource in the cache.voidput(COSObjectKey key, PDShading shading) Puts the given key shading resource in the cache.voidput(COSObjectKey key, PDExtendedGraphicsState extGState) Puts the given key extended graphics state resource in the cache.
-
Constructor Details
-
DefaultResourceCache
public DefaultResourceCache()
-
-
Method Details
-
getFont
Description copied from interface:ResourceCacheReturns the font resource for the given key object, if it is in the cache.- Specified by:
getFontin interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key font resource in the cache.- Specified by:
putin interfaceResourceCache
-
getColorSpace
Description copied from interface:ResourceCacheReturns the color space resource for the given key object, if it is in the cache.- Specified by:
getColorSpacein interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key color space resource in the cache.- Specified by:
putin interfaceResourceCache
-
getExtGState
Description copied from interface:ResourceCacheReturns the external graphics state resource for the given key object, if it is in the cache.- Specified by:
getExtGStatein interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key extended graphics state resource in the cache.- Specified by:
putin interfaceResourceCache
-
getShading
Description copied from interface:ResourceCacheReturns the shading resource for the given key object, if it is in the cache.- Specified by:
getShadingin interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key shading resource in the cache.- Specified by:
putin interfaceResourceCache
-
getPattern
Description copied from interface:ResourceCacheReturns the pattern resource for the given key object, if it is in the cache.- Specified by:
getPatternin interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key pattern resource in the cache.- Specified by:
putin interfaceResourceCache
-
getProperties
Description copied from interface:ResourceCacheReturns the property list resource for the given key object, if it is in the cache.- Specified by:
getPropertiesin interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key property list resource in the cache.- Specified by:
putin interfaceResourceCache
-
getXObject
Description copied from interface:ResourceCacheReturns the XObject resource for the given key object, if it is in the cache.- Specified by:
getXObjectin interfaceResourceCache
-
put
Description copied from interface:ResourceCachePuts the given key XObject resource in the cache.- Specified by:
putin interfaceResourceCache
-
clear
public void clear()Description copied from interface:ResourceCacheClears the cache- Specified by:
clearin interfaceResourceCache
-