Class Base64Converter

java.lang.Object
org.apache.tools.ant.util.Base64Converter
Direct Known Subclasses:
Get.Base64Converter

public class Base64Converter
extends java.lang.Object
BASE 64 encoding of a String or an array of bytes. Based on RFC 1421.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static char[] alphabet
    Provided for BC purposes
  • Constructor Summary

    Constructors 
    Constructor Description
    Base64Converter()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String encode​(byte[] octetString)
    Encode a byte array into base64 encoding.
    java.lang.String encode​(java.lang.String s)
    Encode a string into base64 encoding.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • alphabet

      public static final char[] alphabet
      Provided for BC purposes
  • Constructor Details

  • Method Details

    • encode

      public java.lang.String encode​(java.lang.String s)
      Encode a string into base64 encoding.
      Parameters:
      s - the string to encode.
      Returns:
      the encoded string.
    • encode

      public java.lang.String encode​(byte[] octetString)
      Encode a byte array into base64 encoding.
      Parameters:
      octetString - the byte array to encode.
      Returns:
      the encoded string.