Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
com.github.davidcarboni:resource-utils
Advanced tools
Convenience for dealing with Java resources as properties, files, text and input streams.
Resource Utils provides straightforward access to Java resources in several formats so you don't have to write boilerplate conversions.
To get a resource as Properties
:
Properties properties = ResourceUtils.getProperties("/com/github/davidcarboni/app.properties");
To get a resource as an XML Document
:
Document document = ResourceUtils.getXml("/com/github/davidcarboni/app.xml");
To get a resource as a String
:
String string = ResourceUtils.getString("/com/github/davidcarboni/string.resource");
To extract a resource to a temp File
:
File temp = ResourceUtils.getFile("/com/github/davidcarboni/file.resource");
To get a resource as a Reader
:
Reader reader = ResourceUtils.getReader("/com/github/davidcarboni/character.resource");
To get a resource as a good old InputStream
:
InputStream input = ResourceUtils.getStream("/com/github/davidcarboni/resource.data");
To use resource-utils
in your project:
<dependency>
<groupId>com.github.davidcarboni</groupId>
<artifactId>resource-utils</artifactId>
<version>1.1.0</version>
</dependency>
FAQs
Convenience for dealing with Java resources as properties, files, text and input streams.
We found that com.github.davidcarboni:resource-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.