Class Resources.ClasspathResource

java.lang.Object
io.cucumber.core.resource.Resources.ClasspathResource
All Implemented Interfaces:
Resource
Enclosing class:
Resources

private static class Resources.ClasspathResource extends Object implements Resource
  • Field Details

    • uri

      private final URI uri
    • resource

      private final Path resource
  • Constructor Details

    • ClasspathResource

      ClasspathResource(Path baseDir, Path resource)
    • ClasspathResource

      ClasspathResource(String classpathResourceName, Path baseDir, Path resource)
  • Method Details

    • getUri

      public URI getUri()
      Description copied from interface: Resource
      Returns a uri representing this resource.

      Resources on the classpath will have the form classpath:com/example.feature while resources on the file system will have the form file:/path/to/example.feature. Other resources will be represented by their exact uri.

      Specified by:
      getUri in interface Resource
      Returns:
      a uri representing this resource
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface Resource
      Throws:
      IOException