org.pdfbox.util

Class ResourceLoader


public class ResourceLoader
extends java.lang.Object

This class will handle loading resource files(AFM/CMAP).
Version:
$Revision: 1.8 $
Author:
Ben Litchfield

Method Summary

static Properties
loadProperties(String resourceName)
This will attempt to load the resource given the resource name.
static Properties
loadProperties(String resourceName, Properties defaults)
This will attempt to load the resource given the resource name.
static InputStream
loadResource(String resourceName)
This will attempt to load the resource given the resource name.

Method Details

loadProperties

public static Properties loadProperties(String resourceName)
            throws IOException
This will attempt to load the resource given the resource name.
Parameters:
resourceName - The resource to try and load.
Returns:
The resource as a stream or null if it could not be found.

loadProperties

public static Properties loadProperties(String resourceName,
                                        Properties defaults)
            throws IOException
This will attempt to load the resource given the resource name.
Parameters:
resourceName - The resource to try and load.
defaults - A stream of default properties.
Returns:
The resource as a stream or null if it could not be found.

loadResource

public static InputStream loadResource(String resourceName)
            throws IOException
This will attempt to load the resource given the resource name.
Parameters:
resourceName - The resource to try and load.
Returns:
The resource as a stream or null if it could not be found.