Interface ResourceLocator

  • All Known Implementing Classes:
    ClassLoaderResourceLocator

    public interface ResourceLocator
    Interface to locate and open resources. Implementations can locate resources for example from the file system, class loader or Android asset manager.
    • Method Detail

      • resourceExists

        boolean resourceExists​(String path)
        Returns whether the specified resource exists.
        Parameters:
        path - the resource path
        Returns:
        true if the resource exists, false otherwise
      • openResource

        InputStream openResource​(String path)
                          throws IOException
        Opens the resource at the specified path.
        Parameters:
        path - the resource path
        Returns:
        the input stream
        Throws:
        IOException - if the resource doesn't exist or can't be opened