In this tutorial, we explore Apache Commons Compress, a library for file compression, archiving, and extraction. It supports various formats like TAR, ZIP, GZIP, BZIP2, and more.
Also find me here:
Baeldung Author
Ulisses Lima
By day, I write new code, I improve bad code, and I try to enforce performance standards. Mostly in Java. I also love automating stuff. Mostly in bash. By night, I write technical articles and write tools for personal management. For fun: I'm a Street Fighter player (3rd Strike and V), trying to learn Japanese.
Here's what I've written (so far):
Baeldung on Java
- All
- Spring Data (6)
- NoSQL (4)
- Java (3)
- Spring (2)
- Java IO (2)
- Core Java (2)
- REST (1)
- Persistence (1)
- Java Web (1)
- Java Numbers (1)
- Java Map (1)
- Java Dates (1)
- JSON (1)
- HTTP Client-Side (1)
Custom Event Handlers and Listeners in Netty
Filed under Java
Learn to make a basic chat room using Netty. Key features include custom event handlers, server bootstrapping, and event listeners.
Find Files by Extension in Specified Directory in Java
Filed under Java IO
Learn to use core Java and external libraries to search for files in a directory (including sub-directories) that match a specific extension.
Context-Specific Deserialization Filters in Java 17
Filed under Core Java
Explore Java’s latest enhancement, Context-Specific Deserialization Filter (JEP 415), in action.
MongoDB Atlas Search Using the Java Driver and Spring Data
Filed under Spring Data
A quick and practical guide to MongoDB Atlas search with Spring Data.
Custom DLL Load – Fixing the “java.lang.UnsatisfiedLinkError” Error
Filed under Java
Explore common causes like incorrect library names, missing directory specifications, and incompatible architectures. Implement solutions such as setting java.library.path and using proper classloaders to resolve this error effectively.
MongoDB – Field Level Encryption
Filed under NoSQL, Persistence
A practical guide to field-level encryption with MongoDB.
Extracting a Tar File in Java
Filed under Java IO
In this tutorial, we explore Java libraries for extracting tar archives: Apache Commons Compression, Apache Ant, and Apache VFS. The article provides concise code snippets and highlights the key features of each approach. Read on to learn efficient ways of extracting tar archives in Java.
Stream Large Byte[] to File With WebClient
Filed under HTTP Client-Side, Spring
This is a short tutorial about how to stream a large file to a file using a DataBuffer and what’s the role of ExchangeStrategies in WebClient.
Calling JMX MBean Method From a Shell Script
Filed under Core Java
Learn how to access MBeans from a shell script.
How to Insert a HashMap Into MongoDB With Java?
Learn how to insert HashMap into MongoDB.
Limiting the Requests per Second With WebClient
Learn various ways of limiting the request per second of a web client.
Creating Random Numbers With No Duplicates in Java
Filed under Java Numbers
Learn how to generate unique random numbers efficiently.
Create Date From Unix Timestamp in Java
Filed under Java Dates
Learn how to transform UNIX time to Date depending on the Java version.
Reading JSON From a URL in Java
Filed under JSON
How to read JSON from a URL using core java libraries and third-party libraries.
Spring Data MongoDB – Configure Connection
Filed under Spring Data
Different ways of setting up a MongoDB connection.
Count Documents Using Spring Data MongoDB Repository
Filed under Spring Data
Different ways of counting documents using Spring Data MongoDB.
Unique Field in MongoDB Document in Spring Data
Filed under NoSQL, Spring Data
Different ways to create unique fields via indexes with Spring Data.
MongoDB Composite Key With Spring Data
Filed under Spring Data
Simple and compound index, generated and custom ids in MongoDB exemplified by a Spring Data Mongo application.
Configure MongoDB Collection Name for a Class in Spring Data
Filed under NoSQL, Spring Data
Learn how to configure MongoDB collection names for classes using Spring Data.
Exception Handling With Jersey
Filed under REST
Explore many ways we can handle exceptions using Jersey.