Base64Converter (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.util, class: Base64Converter

# Class Base64Converter

java.lang.Object
org.apache.tools.ant.util.Base64Converter

Direct Known Subclasses:
  `Get.Base64Converter`

public class Base64Converter extends 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 final char[]`
  `alphabet`
  Provided for BC purposes

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Base64Converter()`

- ## Method Summary

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

  ### Methods inherited from class 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

  - ### Base64Converter

    public Base64Converter()

- ## Method Details

  - ### encode

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

  - ### encode

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