Skip to content
Read files with easy... with Easy Files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Maven Central

Easy Files

Maven dependency


Resources folder files - ResourceFile

Reading files in the resources folder

No matter if the resource files are in the File System or in the Jar.

ResourceFile file = new ResourceFile("my-file.json");

Regular files in File System - UserFiles, UserHomeFile

UserFile file = new UserFile("c:/myfiles/myfile.txt");
UserHomeFile file = new UserHomeFile("my-user-home-test.txt");

Network resources

It can be a file somewhere in the Internet or other resources accessible through urls.

NetworkResource file = new NetworkResource("")

Read file examples

String content = file.content();
List<String> lines = file.lines();

Book book = file.fromJson(Book.class);
List<Book> books = file.fromJsonAsList(Book[].class);

Book book = file.fromYaml(Book.class);
List<Book> books = file.fromYamlAsList(Book.class);

Properties properties =;
You can’t perform that action at this time.