Package org.apache.pdfbox.pdmodel
Class ResourceCacheFactory
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.ResourceCacheFactory
-
public class ResourceCacheFactory extends java.lang.ObjectFactory 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 Modifier and Type Field Description private static ResourceCacheCreateFunctionresourceCacheCreateFunction
-
Constructor Summary
Constructors Constructor Description ResourceCacheFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceCachecreateResourceCache()Create an instance of a resource cache using the provided function.static ResourceCacheCreateFunctiongetResourceCacheCreateFunction()Get the current function to be used to create an instance of a resource cache.static voidsetResourceCacheCreateFunction(ResourceCacheCreateFunction function)Use the given function to create an instance of a resource cache.
-
-
-
Field Detail
-
resourceCacheCreateFunction
private static ResourceCacheCreateFunction resourceCacheCreateFunction
-
-
Method Detail
-
setResourceCacheCreateFunction
public static void setResourceCacheCreateFunction(ResourceCacheCreateFunction function)
Use the given function to create an instance of a resource cache. Caching is disabled if a null value is provided.
-
getResourceCacheCreateFunction
public static ResourceCacheCreateFunction getResourceCacheCreateFunction()
Get the current function to be used to create an instance of a resource cache.- Returns:
- the current function or null.
-
createResourceCache
public static ResourceCache 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.
-
-