Socket
Socket
Sign inDemoInstall

com.github.davidcarboni:resource-utils

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.davidcarboni:resource-utils

Convenience for dealing with Java resources as properties, files, text and input streams.


Version published
Maintainers
1
Source

Build Status Resource Utils

What is it?

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");

Maven usage

To use resource-utils in your project:

	<dependency>
		<groupId>com.github.davidcarboni</groupId>
		<artifactId>resource-utils</artifactId>
		<version>1.1.0</version>
	</dependency>

	

FAQs

Package last updated on 12 Mar 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc