How to do Base64 encoding and decoding in Java, using the new APIs introduced in Java 8 as well as Apache Commons.
Search Results for: apache commons
Java – Directory Size
Calculate the Size of a Directory with Java 6, 7 and 8 as well as Apache Commons IO and Guava.
Java – Generate Random String
Generate Bounded and Unbounded Random Strings using plain Java and the Apache Commons Lang library.
Java – Write a Reader to File
How to write out the contents of a Reader to File using plain Java, Guava or Apache Commons IO.
Java – Reader to InputStream
How to convert a Reader into an InputStream using Java, Guava and the Apache Commons IO library.
Java – InputStream to Reader
How to convert an InputStream to a Reader using Java, Guava and the Apache Commons IO library.
Java – Reader to Byte Array
How to convert a Reader into a byte[] using plain Java, Guava or the Apache Commons IO library.
Java – Reader to String
How to convert a Reader into a String using Java, Guava and the Apache Commons IO library.
Java – File to Reader
How to convert a File to a Reader using Java, Guava and the Apache Commons IO library.
Java – Byte Array to Reader
How to Convert a Byte Array into a Reader with plain Java, Guava and the Apache Commons IO library.
Java – Rename or Move a File
How to rename or move a file in Java, using JDK6, JDK7, Guava or Apache Commons.
Java – Convert File to InputStream
How to open an InputStream from a Java File – using plain Java, Guava and the Apache Commons IO library.
Converting Between a List and a Set in Java
How to Convert between a List and a Set using plain Java, Guava or Apache Commons Collections.
Converting Between an Array and a Set in Java
How to Convert between an Array and a Set Using Plain Java, Guava or Apache Commons Collections.
Converting Between an Array and a List in Java
How to Convert between an Array and a List Using plain Java, Guava or Apache Commons Collections.
Immutable ArrayList in Java
Create an immutable List from an ArrayList with the JDK, Guava or Apache Commons Collections.
Partition a List in Java
How to Partition a List using Guava or Apache Commons Collections.
Calculating Moving Averages in Java
Let’s explore various methods and techniques for calculating moving averages, ranging from traditional approaches to libraries and Stream API’s.
Check if an Element Is Present in a Set in Java
Learn to check if an element is in a Set in Java.
Get Last n Characters From a String
Learn a few different ways to get the last n characters from a String.