Class ResourceUtil

    • 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.