Learn to use the SetUtils API of Apache Commons Collections library.
Search Results for: apache commons
Introduction to Apache Commons Math
Learn about the Apache Commons Math, which is the biggest open-source library of mathematical functions and utilities for Java.
String Processing with Apache Commons Lang 3
Quick intro to working with Strings with the Apache Commons library and StringUtils.
Array Processing with Apache Commons Lang 3
Quick intro to working with arrays with the Apache Commons library and ArrayUtils.
Differences Between the Java WatchService API and the Apache Commons IO Monitor Library
The main differences between the WatchService API from the JDK and the Apache Commons IO Monitoring Library for tracking changes in the filesystem.
What Is an Apache Maven Artifact?
Learn what a Maven artifact is and get an understanding of coordinates, dependency management, and repositories.
Enabling Logging for Apache HttpClient
Learn how to enable logging for the Apache HttpClient.
Spring and Apache FileUpload
A quick and practical guide to using Apache FileUpload with Spring.
Expand Shortened URLs with Apache HttpClient
Learn how to expand shortened URLs in Java using the Apache HttpClient.
Get First n Characters in a String in Java
Learn how to efficiently extract the first n characters of a string in Java using core JDK methods and popular libraries like Apache Commons Lang and Guava.
How to Center Text Output in Java
Learn multiple ways to center text output in Java: String formatting, StringBuilder, and StringUtils from the Apache Commons Lang libraries.
Extracting a Tar File in Java
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.
Adding One Month to Current Date in Java
In this short tutorial, we discuss various methods of adding one month to the current date in Java. We cover using core Java methods as well as popular external libraries such as Joda-Time and Apache Commons Lang3.
Lossy and Lossless Image Compression Using Java
Learn how to compress images in Java using built-in libraries and Apache Commons Imaging. Image compression reduces file size without compromising visual quality. It optimizes image-heavy applications and websites for faster loading and better user experience.
Java PrintStream to String
This article provides several ways of converting a PrintStream to a String in Java.The approaches include using ByteArrayOutputStream, a custom output stream, and Apache Commons IO.
Getting the Filename From a String Containing an Absolute File Path
Learn how to extract the filename from an absolute path using core Java and Apache Commons.
Check if a String Ends with a Certain Pattern in Java
Learn how to check if a String ends in a certain pattern in Java using core Java methods as well as Apache Commons Lang’s StringUtils class.
Splitting a Java String by Multiple Delimiters
Learn different options for splitting an input string by multiple delimiters using regular expressions, Google Guava, and Apache Commons
Java Convert PDF to Base64
Learn how to do Base64 encoding and decoding of a PDF file using Java 8 and Apache Commons Codec.
Converting a Stack Trace to a String in Java
Learn how to convert a Stack Trace to a String using core Java method or Apache Commons-Lang library.