Home » codec

Tag Archives: codec

Decode Base64

This is an example of how to decode Strings with the Base64 algorithm. We are using the org.apache.commons.codec.binary.Base64 class that provides Base64 encoding and decoding as defined by RFC 2045. Decoding with org.apache.commons.codec.binary.Base64 class implies that you should: Create a String. Get the bytes from the String, using getBytes() API method of String. Use decodeBase64(byte[] base64Data) API method, using the byte ...

Read More »

Encode Base64

In this example we shall show you how to encode Strings with the Base64 algorithm. We are using the org.apache.commons.codec.binary.Base64 class that provides Base64 encoding and decoding as defined by RFC 2045. To encode a String with Base64 one should perform the following steps: Create a String. Get the bytes from the String, using getBytes() API method of String. Use encodeBase64(byte[] ...

Read More »