Package org.apache.pdfbox.pdmodel
Class ResourceCacheFactory
java.lang.Object
org.apache.pdfbox.pdmodel.ResourceCacheFactory
Factory which provides a function to create an instance of a ResourceCache to be used to cache resources while
processing a pdf.
A DefaultResourceCache is used as default implementation. I can be replaced with an individual implementation.
Setting the function to null disables the cache.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceCacheCreate an instance of a resource cache using the provided function.static ResourceCacheCreateFunctionGet the current function to be used to create an instance of a resource cache.static voidUse the given function to create an instance of a resource cache.
-
Field Details
-
resourceCacheCreateFunction
-
-
Constructor Details
-
ResourceCacheFactory
public ResourceCacheFactory()
-
-
Method Details
-
setResourceCacheCreateFunction
Use the given function to create an instance of a resource cache. Caching is disabled if a null value is provided. -
getResourceCacheCreateFunction
Get the current function to be used to create an instance of a resource cache.- Returns:
- the current function or null.
-
createResourceCache
Create an instance of a resource cache using the provided function. Returns null if the function is set to null.- Returns:
- an instance of a resource cache.
-