Package pl.poznan.put.utility
Class ResourcesHelper
java.lang.Object
pl.poznan.put.utility.ResourcesHelper
A collection of methods to work with resources (src/main/resources/).
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringloadResource(String resource) Load contents of a resource file available in the JAR of running process.static FileloadResourceFile(String resource) Translate resource address to a URI and then to File instance.static URIloadResourceUri(String resource) Translate resource address to a URI.
- 
Method Details- 
loadResourceLoad contents of a resource file available in the JAR of running process.- Parameters:
- resource- Name of the resource.
- Returns:
- Contents of the file addressed by the resource name.
- Throws:
- IOException- If the file cannot be converted to- String
 
- 
loadResourceFileTranslate resource address to a URI and then to File instance.- Parameters:
- resource- Name of the resource.
- Returns:
- The path to the resource.
- Throws:
- URISyntaxException- If the resource URI could not be created.
 
- 
loadResourceUriTranslate resource address to a URI.- Parameters:
- resource- Name of the resource.
- Returns:
- URI of the resource.
- Throws:
- URISyntaxException- If the resource URI could not be created.
 
 
-