Other Improvements

Base64

We no longer have to use sun.misc.BASE64Encoder or org.apache.commons.codec.binary.Base64. No we can use java.util.Base64arrow-up-right class. This is because the internal APIsarrow-up-right were encapsulated and are no longer available.

byte[] toEncode = "dummy string".getBytes();

byte[] encoded = Base64.getEncoder().encode(toEncode);
String encodedString = new String(encoded);

Assert.assertEquals("ZHVtbXkgc3RyaW5n", encodedString);

Unsafe

Unsafe is meant to be used only by internal core Java classes.

Last updated

Was this helpful?