Class Base64


  • public class Base64
    extends java.lang.Object
    Kleine Hilfe-Klasse zum Encoden und Decoden von Base64. Der Zugriff auf die Encoder/Decoder von Java geschieht per Reflection, damit die Klasse sowohl unter Java < 8 lauffaehig ist (dort existiert java.util.Base64 noch nicht) als auch unter Java >= 9 (dort existiert "sun.misc.BASE64*" nicht mehr).
    • Constructor Summary

      Constructors 
      Constructor Description
      Base64()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decode​(java.lang.String base64)
      Dekodiert Base64 in Text.
      static java.lang.String encode​(byte[] text)
      Kodiert Text nach Base64.
      • 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

      • decode

        public static final byte[] decode​(java.lang.String base64)
                                   throws java.io.IOException
        Dekodiert Base64 in Text.
        Parameters:
        base64 - Base64.
        Returns:
        Text.
        Throws:
        java.io.IOException
      • encode

        public static final java.lang.String encode​(byte[] text)
        Kodiert Text nach Base64.
        Parameters:
        text -
        Returns:
        Base64-Version.