Package org.jolokia.server.core.util
Class Base64Util
java.lang.Object
org.jolokia.server.core.util.Base64Util
Base64 routine taken from http://iharder.sourceforge.net/current/java/base64/ (public domain)
It has be tailored to suite our needs, so some things likes compression and
multiline output has been removed for the sake of simplicity.
- Since:
- 13/09/15
- Author:
- roland
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Base64 encoding methods of Authentication Taken from http://iharder.sourceforge.net/current/java/base64/ (public domain) and adapted for our needs here.static Stringencode(byte[] source) Encodes a byte array into Base64 notation.static byte[]encodeBytesToBytes(byte[] source, int len)
-
Constructor Details
-
Base64Util
public Base64Util()
-
-
Method Details
-
decode
Base64 encoding methods of Authentication Taken from http://iharder.sourceforge.net/current/java/base64/ (public domain) and adapted for our needs here. -
encode
Encodes a byte array into Base64 notation. Does not GZip-compress data.- Parameters:
source- The data to convert- Returns:
- The data in Base64-encoded form
- Throws:
NullPointerException- if source array is null- Since:
- 1.4
-
encodeBytesToBytes
public static byte[] encodeBytesToBytes(byte[] source, int len)
-