Interface ResourceLoader

All Known Implementing Classes:
ClassPathResourceLoader, SpeedTestResourceLoader, ZipFileResourceLoader

public interface ResourceLoader
Opens streams for resources from a backing source or generated content.
  • Method Details

    • getSource

      String getSource()
      Returns the resource source.
      Returns:
      a string representing the source resources are loaded from
    • openInputStream

      InputStream openInputStream(String path) throws IOException
      Opens a resource stream. The caller is responsible for closing the returned stream.
      Parameters:
      path - the resource path understood by this loader
      Returns:
      a stream containing the resource data, or null if the resource is not found
      Throws:
      IOException - if opening or reading the resource fails