Skip to content

DiskLib is an easy to use zero dependency Disk Writer & Disk Reader with built in GZIP support for Java.


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



50 Commits

Repository files navigation


DiskLib is an easy-to-use zero dependency Disk Writer & Disk Reader with built-in GZIP support for Java.

💡 Requirements

  • Java Runtime 1.8 or higher

⚙️ How To Add As Library

Add it as a maven dependency or just download the latest release.


📚 Links

💻 How To Use

You can pass either a String path or a File object for the first parameter. To use the GZIP functionality, use GZIPDiskReader or GZIPDiskWriter

For more examples

View the test file here, it has examples of each function being used.

⬆️ Reading

Reading Strings from disk

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

Reading String Arrays from disk

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

Reading Bytes from disk

byte[] bytes = DiskReader.readBytes("hello.txt");

⬇️ Writing

  • You can write / append Lists, or Sets, just pass where the string parameter goes for the content line.

Write new file to disk / overwrite existing file

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

Append to existing file

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