java.lang.Object
io.smallrye.common.resource.Resource
io.smallrye.common.resource.JarFileResource
A resource representing an entry in a JAR file.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of code signers for this resource.booleanReturns true if this resource represents a directory, or false otherwise.Returns the modification time of the resource, ornullif the time is unknown.Open a directory stream to read the contents of this directory.Open an input stream to read this resource.longsize()Returns the size of the resource, or-1if the size is not known.url()Returns the resource URL (notnull).
-
Method Details
-
url
Description copied from class:ResourceReturns the resource URL (notnull). If the resource location information cannot be converted to a URL, an exception may be thrown. -
isDirectory
public boolean isDirectory()Description copied from class:ResourceReturns true if this resource represents a directory, or false otherwise. Not every resource implementation supports directory access.- Overrides:
isDirectoryin classResource- Returns:
- true if this resource represents a directory, or false otherwise
-
openDirectoryStream
Description copied from class:ResourceOpen a directory stream to read the contents of this directory. Not every resource implementation supports directory access.- Overrides:
openDirectoryStreamin classResource- Returns:
- the directory stream (not
null) - Throws:
IOException- if the directory could not be opened or the resource is not a directory
-
modifiedTime
Description copied from class:ResourceReturns the modification time of the resource, ornullif the time is unknown.- Overrides:
modifiedTimein classResource- Returns:
- the modification time of the resource, or
nullif the time is unknown
-
codeSigners
Description copied from class:ResourceReturns 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:
codeSignersin classResource- Returns:
- the list of code signers for this resource
-
openStream
Description copied from class:ResourceOpen an input stream to read this resource.- Specified by:
openStreamin classResource- 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:ResourceReturns the size of the resource, or-1if the size is not known.
-