The Bytecode Club
Log inJoin the club
Java Projects / Libraries

DiskLib - File Reader & Writer (Easy to use API)

Started by Konloch · Feb 17, 2023

0 replies22,880 views
Feb 17, 2023#1

About: DiskLib is an easy to use zero dependency Disk Writer & Disk Reader with built in GZIP support for Java.
License: MIT License
Source: https://konloch.com/DiskLib/
Download Jar: https://konloch.com/DiskLib/releases/
Add as maven dependency:

<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>DiskLib</artifactId>
  <version>1.0.1</version>
</dependency>

Write new file to disk / overwrite existing file

DiskReader.write("hello.txt", "Hello ");

Append to existing file

DiskReader.append("hello.txt", "World");

Reading Strings from disk

ArrayList<String> lines = DiskReader.read("hello.txt");

Reading String Arrays from disk

String[] lines = DiskReader.readLines("hello.txt");

Reading Bytes from disk

byte[] bytes = DiskReader.readBytes("hello.txt");
Got something to add?

Log in to post a reply.

Join the conversation