Class Resources.FileSystemResource

java.lang.Object
org.citrusframework.spi.Resources.FileSystemResource
All Implemented Interfaces:
Resource
Enclosing class:
Resources

public static class Resources.FileSystemResource extends Object implements Resource
Resource on the file system.
  • Constructor Details

    • FileSystemResource

      public FileSystemResource(String path)
    • FileSystemResource

      public FileSystemResource(File file)
  • Method Details

    • getLocation

      public String getLocation()
      Description copied from interface: Resource
      The location of the resource.
      Specified by:
      getLocation in interface Resource
    • getURI

      public URI getURI()
      Description copied from interface: Resource
      The URI of the resource.

      The default implementation creates a URI object from resource location.
      Specified by:
      getURI in interface Resource
    • exists

      public boolean exists()
      Description copied from interface: Resource
      Whether this resource exists.
      Specified by:
      exists in interface Resource
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: Resource
      Returns an InputStream that reads from the underlying resource.

      Each invocation must return a new InputStream instance.
      Specified by:
      getInputStream in interface Resource
    • getFile

      public File getFile()
      Description copied from interface: Resource
      Return the file associated with this resource.
      Specified by:
      getFile in interface Resource
      Returns: