Class JarFileResource

java.lang.Object
io.smallrye.common.resource.Resource
io.smallrye.common.resource.JarFileResource

public final class JarFileResource extends Resource
A resource representing an entry in a JAR file.
  • Method Details

    • url

      public URL url()
      Description copied from class: Resource
      Returns the resource URL (not null). If the resource location information cannot be converted to a URL, an exception may be thrown.
      Specified by:
      url in class Resource
      Returns:
      the resource URL (not null)
    • isDirectory

      public boolean isDirectory()
      Description copied from class: Resource
      Returns true if this resource represents a directory, or false otherwise. Not every resource implementation supports directory access.
      Overrides:
      isDirectory in class Resource
      Returns:
      true if this resource represents a directory, or false otherwise
    • openDirectoryStream

      public DirectoryStream<Resource> openDirectoryStream() throws IOException
      Description copied from class: Resource
      Open a directory stream to read the contents of this directory. Not every resource implementation supports directory access.
      Overrides:
      openDirectoryStream in class Resource
      Returns:
      the directory stream (not null)
      Throws:
      IOException - if the directory could not be opened or the resource is not a directory
    • modifiedTime

      public Instant modifiedTime()
      Description copied from class: Resource
      Returns the modification time of the resource, or null if the time is unknown.
      Overrides:
      modifiedTime in class Resource
      Returns:
      the modification time of the resource, or null if the time is unknown
    • codeSigners

      public List<CodeSigner> codeSigners()
      Description copied from class: Resource
      Returns the list of code signers for this resource. The resource must have been fully read, or else consumed as a buffer. By default, the base implementation returns an empty list.
      Overrides:
      codeSigners in class Resource
      Returns:
      the list of code signers for this resource
    • openStream

      public InputStream openStream() throws IOException
      Description copied from class: Resource
      Open an input stream to read this resource.
      Specified by:
      openStream in class Resource
      Returns:
      the input stream (not null)
      Throws:
      IOException - if the input stream could not be opened or the resource is a directory
    • size

      public long size()
      Description copied from class: Resource
      Returns the size of the resource, or -1 if the size is not known.
      Specified by:
      size in class Resource
      Returns:
      the size of the resource, or -1 if the size is not known