Class ResourceUtil
- java.lang.Object
-
- org.apache.directory.fortress.core.util.ResourceUtil
-
public final class ResourceUtil extends Object
Getting a resource.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStream
getInputStream(String _reference)
Checks that the reference is either an absolute path to a file, or a reference to a file within reach of class loader resources.static InputStream
getInputStreamForFileAbsolutePath(String _path)
Will check that the path is absolute and is pointing to an existing file.
-
-
-
Method Detail
-
getInputStream
public static InputStream getInputStream(String _reference)
Checks that the reference is either an absolute path to a file, or a reference to a file within reach of class loader resources. A directory is not accepted.- Parameters:
_reference
-- Returns:
- An InputStream to a file, or null if no file was found.
-
getInputStreamForFileAbsolutePath
public static InputStream getInputStreamForFileAbsolutePath(String _path)
Will check that the path is absolute and is pointing to an existing file. A directory is not accepted.- Parameters:
_path
- absolute path to a file- Returns:
- An InputStream if the path is absolute and is pointing to a file, or null if no file was found.
-
-