org.deri.iris.builtins.datatype
Class ToBase64Builtin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.FunctionalBuiltin
org.deri.iris.builtins.datatype.ConversionBuiltin
org.deri.iris.builtins.datatype.ToBase64Builtin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
public class ToBase64Builtin
- extends ConversionBuiltin
Represents a data type conversion function, which converts supported data
type instances to Base64 instances. The following data types are supported:
ToBase64Builtin
public ToBase64Builtin(ITerm... terms)
- Creates a new instance of this built-in.
- Parameters:
terms - The term representing the data type instance to be
converted.
convert
protected ITerm convert(ITerm term)
- Description copied from class:
ConversionBuiltin
- Converts the given supported data type instance to the specific data type
- Specified by:
convert in class ConversionBuiltin
- Returns:
- The result of the conversion or
null if the
specified data type is not compatible.
toBase64
public static IBase64Binary toBase64(IStringTerm term)
- Converts a String term to a Base64 term.
- Parameters:
term - The String term to be converted.
- Returns:
- A new Base64 term representing the result of the conversion.
toBase64
public static IBase64Binary toBase64(IHexBinary term)
- Converts a HexBinary term to a Base64 term.
- Parameters:
term - The HexBinary term to be converted.
- Returns:
- A new Base64 term representing the result of the conversion.