Class 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 Detail

      • URLFileOpener

        public URLFileOpener()
      • URLFileOpener

        public URLFileOpener​(URL url)
      • URLFileOpener

        public URLFileOpener​(String address)
    • 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 interface PropertyLoaderOpener
        Parameters:
        fileName - the filename
        Returns:
        InputStream of the resource found at the given URL