Resource
public class JarResource extends Object implements Resource
Constructor | Description |
---|---|
JarResource() |
Constructor.
|
JarResource(File jarFile) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
Stream<String> |
getAllLocations() |
|
File |
getJarFile() |
Get the JAR file.
|
URL |
getResource(String location) |
Get the resource.
|
InputStream |
getResourceAsStream(String location) |
Get the resource as a stream.
|
void |
setJarFile(File jarFile) |
Set the JAR file.
|
public JarResource()
public JarResource(File jarFile)
jarFile
- the JAR file.public URL getResource(String location)
Resource
getResource
in interface Resource
location
- the location.public InputStream getResourceAsStream(String location)
Note that this method will read the content of a JAR entry into a byte-array to avoid locking the JAR file.
getResourceAsStream
in interface Resource
location
- the resource location.Resource.getResourceAsStream(java.lang.String)
public Stream<String> getAllLocations()
getAllLocations
in interface Resource
public File getJarFile()
public void setJarFile(File jarFile)
jarFile
- the JAR file.Copyright © 2020 Piranha Cloud. All rights reserved.