Package org.verapdf.tools
Class StaticResources
java.lang.Object
org.verapdf.tools.StaticResources
Class handles static resources that need to be reset with each parsing of
document.
- Author:
- Sergey Shemyakov
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Caches CMap object.static void
cacheFontProgram
(String key, FontProgram font) static void
cacheStructureNameSpace
(PDStructureNameSpace nameSpace) Caches structure name space.static void
clear()
Clears all cached static resources.static FontProgram
getCachedFont
(String key) static Map<String,
FontProgram> static CMap
Gets CMap for this string key.static PDDocument
static PDFFlavour
static String
static PDStructureNameSpace
Gets cached pd structure name space.static Map<COSKey,
PDStructureNameSpace> static void
setCachedFonts
(Map<String, FontProgram> cachedFonts) static void
setcMapCache
(Map<String, CMap> cMapCache) static void
setDocument
(PDDocument document) static void
setFlavour
(PDFFlavour flavour) static void
setPassword
(String password) static void
setStructureNameSpaceCache
(Map<COSKey, PDStructureNameSpace> structureNameSpaceCache)
-
Method Details
-
cacheCMap
Caches CMap object.- Parameters:
name
- is string key for cached CMap.cMap
- is CMap object for caching.
-
getDocument
-
setDocument
-
getCMap
Gets CMap for this string key.- Parameters:
name
- is key for CMap.- Returns:
- cached CMap with this name or null if no CMap available.
-
cacheStructureNameSpace
Caches structure name space. Key is chosen to be indirect reference key of this namespace dictionary.- Parameters:
nameSpace
- is PD structure name space to cache.
-
getStructureNameSpace
Gets cached pd structure name space.- Parameters:
key
- is COSKey of namespace to get.- Returns:
- cached namespace with this COSKey or null if no namespace available.
-
cacheFontProgram
-
getCachedFont
-
clear
public static void clear()Clears all cached static resources. -
getcMapCache
-
setcMapCache
-
getStructureNameSpaceCache
-
setStructureNameSpaceCache
public static void setStructureNameSpaceCache(Map<COSKey, PDStructureNameSpace> structureNameSpaceCache) -
getCachedFonts
-
setCachedFonts
-
getFlavour
-
setFlavour
-
getPassword
-
setPassword
-