Package org.bson.internal
Class Base64
- java.lang.Object
-
- org.bson.internal.Base64
-
public final class Base64 extends java.lang.Object
Provides Base64 encoding and decoding.
This class implements Base64 encoding
Thanks to Apache Commons project. This class refactored from org.apache.commons.codec.binary
Original Thanks to commons project in ws.apache.org for this code.
- Since:
- 3.5
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
decode(java.lang.String s)
Decodes the given Base64-encoded string.static java.lang.String
encode(byte[] in)
Encodes the given byte array into a Base64-encoded string.
-
-
-
Method Detail
-
decode
public static byte[] decode(java.lang.String s)
Decodes the given Base64-encoded string.- Parameters:
s
- the Base64-encoded string- Returns:
- the decoded byte array
-
encode
public static java.lang.String encode(byte[] in)
Encodes the given byte array into a Base64-encoded string.- Parameters:
in
- the byte array- Returns:
- the Base64-encoded string
-
-