Interface IoResource<T>

Type Parameters:
T - Type of resource
All Superinterfaces:
NamedResource, ResourceStreamProvider
All Known Implementing Classes:
AbstractIoResource, ClassLoaderResource, PathResource, URIResource, URLResource

public interface IoResource<T> extends NamedResource, ResourceStreamProvider
  • Method Details

    • getResourceType

      Class<T> getResourceType()
      Returns:
      The type of resource being represented
    • getResourceValue

      T getResourceValue()
      Returns:
      The resource value serving as basis for the provided data stream
    • forResource

      static IoResource<?> forResource(Object resource)
      Attempts to find the best wrapper for the resource
      Parameters:
      resource - The resource object - ignored if null
      Returns:
      The best wrapper out of the supported ones (null if no initial resource)
      Throws:
      UnsupportedOperationException - if no match found