Class Base64Util

java.lang.Object
org.jolokia.server.core.util.Base64Util

public class Base64Util extends Object
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 Details

    • Base64Util

      public Base64Util()
  • Method Details

    • decode

      public static byte[] decode(String s)
      Base64 encoding methods of Authentication Taken from http://iharder.sourceforge.net/current/java/base64/ (public domain) and adapted for our needs here.
    • encode

      public static String encode(byte[] source)
      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)