Interface Base64Utils


public interface Base64Utils
This interface contains various methods that give you access to base64 encoding and decoding features.
  • Method Details

    • encode

      ByteArray encode(ByteArray data, Base64EncodingOptions... options)
      Encodes all bytes from the specified byte array into a newly-allocated byte array using the Base64 encoding scheme. The returned byte array is of the length of the resulting bytes.
      Parameters:
      data - the byte array to encode
      options - the options to use for encoding
      Returns:
      A newly-allocated byte array containing the resulting encoded bytes.
    • encode

      ByteArray encode(String data, Base64EncodingOptions... options)
      Encodes all bytes from the specified String into a newly-allocated byte array using the Base64 encoding scheme. The returned byte array is of the length of the resulting bytes.
      Parameters:
      data - the string to encode.
      options - the options to use for encoding
      Returns:
      A newly-allocated byte array containing the resulting encoded bytes.
    • encodeToString

      String encodeToString(ByteArray data, Base64EncodingOptions... options)
      Encodes all bytes from the specified byte array into a String using the Base64 encoding scheme.
      Parameters:
      data - the byte array to encode
      options - the options to use for encoding
      Returns:
      A newly-allocated byte array containing the resulting encoded bytes.
    • encodeToString

      String encodeToString(String data, Base64EncodingOptions... options)
      Encodes all bytes from the specified String into a String using the Base64 encoding scheme.
      Parameters:
      data - the string to encode.
      options - the options to use for encoding
      Returns:
      A newly-allocated byte array containing the resulting encoded bytes.
    • decode

      ByteArray decode(ByteArray data, Base64DecodingOptions... options)
      Decodes all bytes from the specified byte array into a newly-allocated byte array using the Base64 decoding scheme. The returned byte array is of the length of the resulting bytes.
      Parameters:
      data - the bytes to decode.
      options - the options to use for decoding
      Returns:
      A newly-allocated byte array containing the resulting decoded bytes.
    • decode

      ByteArray decode(String data, Base64DecodingOptions... options)
      Decodes all bytes from the specified String into a newly-allocated byte array using the Base64 decoding scheme. The returned byte array is of the length of the resulting bytes.
      Parameters:
      data - the string to decode.
      options - the options to use for decoding
      Returns:
      A newly-allocated byte array containing the resulting decoded bytes.