Package com.tom_roush.pdfbox.util
Class PDFBoxResourceLoader
- java.lang.Object
-
- com.tom_roush.pdfbox.util.PDFBoxResourceLoader
-
public class PDFBoxResourceLoader extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPDFBoxResourceLoader.FontLoadLevelEnum to represent what fonts PDFBox should attempt to load
-
Field Summary
Fields Modifier and Type Field Description static PDFBoxResourceLoader.FontLoadLevelLOAD_FONTSOption to disable searching the file system for fonts (Speeds up startup if fonts not needed)
-
Constructor Summary
Constructors Constructor Description PDFBoxResourceLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStreamgetStream(String path)Loads a resource file located in the assets folderstatic voidinit(android.content.Context context)Initializes the loaderstatic booleanisReady()Checks whether the loader has been initialized
-
-
-
Field Detail
-
LOAD_FONTS
public static PDFBoxResourceLoader.FontLoadLevel LOAD_FONTS
Option to disable searching the file system for fonts (Speeds up startup if fonts not needed)
-
-
Method Detail
-
init
public static void init(android.content.Context context)
Initializes the loader- Parameters:
context- the context of the main app
-
isReady
public static boolean isReady()
Checks whether the loader has been initialized- Returns:
- whether the loader has been initialized or not
-
getStream
public static InputStream getStream(String path) throws IOException
Loads a resource file located in the assets folder- Parameters:
path- the path to the resource- Returns:
- the resource as an InputStream
- Throws:
IOException- if the resource cannot be found
-
-