Class URLFileOpener
- java.lang.Object
-
- com.tngtech.propertyloader.impl.openers.URLFileOpener
-
- All Implemented Interfaces:
PropertyLoaderOpener
public class URLFileOpener extends Object implements PropertyLoaderOpener
Searches for properties files at a file system path. The search path can be provided as a String or an URL. Use the empty constructor to search the current directory.
-
-
Constructor Summary
Constructors Constructor Description URLFileOpener()
URLFileOpener(String address)
URLFileOpener(URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
open(String fileName)
Tries to open the given file.String
toString()
-
-
-
Method Detail
-
open
public InputStream open(String fileName)
Tries to open the given file. A filename that starts with '/' is understood as an absolute path, i.e. the URLFileOpener forgets about its path.- Specified by:
open
in interfacePropertyLoaderOpener
- Parameters:
fileName
- the filename- Returns:
- InputStream of the resource found at the given URL
-
-