resourceextractor4j

Java library for making it easy to extract/read resources on the classpath.

License

License

GroupId

GroupId

com.github.fracpete
ArtifactId

ArtifactId

resourceextractor4j
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

resourceextractor4j
Java library for making it easy to extract/read resources on the classpath.
Source Code Management

Source Code Management

https://github.com/fracpete/resourceextractor4j

Download resourceextractor4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.fracpete/resourceextractor4j/ -->
<dependency>
    <groupId>com.github.fracpete</groupId>
    <artifactId>resourceextractor4j</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fracpete/resourceextractor4j/
implementation 'com.github.fracpete:resourceextractor4j:0.0.1'
// https://jarcasting.com/artifacts/com.github.fracpete/resourceextractor4j/
implementation ("com.github.fracpete:resourceextractor4j:0.0.1")
'com.github.fracpete:resourceextractor4j:jar:0.0.1'
<dependency org="com.github.fracpete" name="resourceextractor4j" rev="0.0.1">
  <artifact name="resourceextractor4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fracpete', module='resourceextractor4j', version='0.0.1')
)
libraryDependencies += "com.github.fracpete" % "resourceextractor4j" % "0.0.1"
[com.github.fracpete/resourceextractor4j "0.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
net.sf.trove4j : trove4j jar 3.0.3

Project Modules

There are no modules declared in this project.

resourceextractor4j

Little Java library for making it easy to extract/read resources on the classpath.

Methods

Extracting files

The com.github.fracpete.resourceextractor4j.Files class has the following static methods:

  • extractTo - copies a single resource to an output directory
  • extractTo - copies the resources provided as list to an output directory (when resources are in sub-directories, these will get recreated in the output directory)

Reading content

The com.github.fracpete.resourceextractor4j.Content class has the following static methods:

  • readBytes - reads the resources as byte array
  • readLines - interprets the resource as text file and returns the lines
  • readProperties - populates a java.util.Properties object with the resource
  • readString - reads the resource as single string (with or without java.nio.charset.Charset)

Maven

    <dependency>
      <groupId>com.github.fracpete</groupId>
      <artifactId>resourceextractor4j</artifactId>
      <version>0.0.1</version>
    </dependency>

Versions

Version
0.0.1