Class Base64


  • public class Base64
    extends java.lang.Object
    A utility class to convert to and from base 64 encoding.
    Author:
    Russell Gold
    • Constructor Summary

      Constructors 
      Constructor Description
      Base64()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String decode​(java.lang.String source)
      Returns the plaintext equivalent of a base 64-encoded string.
      static java.lang.String encode​(java.lang.String source)
      Returns the base 64 encoded equivalent of a supplied string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Base64

        public Base64()
    • Method Detail

      • encode

        public static java.lang.String encode​(java.lang.String source)
        Returns the base 64 encoded equivalent of a supplied string.
        Parameters:
        source - the string to encode
      • decode

        public static java.lang.String decode​(java.lang.String source)
        Returns the plaintext equivalent of a base 64-encoded string.
        Parameters:
        source - a base 64 string (which must have a multiple of 4 characters)