Features
Learn about important Java 8 features including the java.util.Base64 class for encoding and decoding, enhanced JVM memory management replacing PermGen, the ability to apply annotations on types, and the introduction of repeatable annotations to support cleaner, more flexible code.
We'll cover the following...
Overview
Java 8 has tons of new features. Here are some of them:
- java.util.Base64
- Cryptography upgrades (lots)
- JDBC 4.2
- Repeatable Annotations
- Annotations on types
Base64
Until now, Java developers had to rely on third-party libraries for encoding and decoding Base-64. Since it is such a frequent operation, a large project will typically contain several different implementations of Base64. For example, Apache commons-codec, Spring, and Guava all have separate implementations.
For this reason, Java 8 has java.util.Base64. It acts as a factory for Base64 encoders and decoders. It has the following methods:
getEncoder()getDecoder()getUrlEncoder()