File64/README.md
2021-08-04 10:48:34 -04:00

688 B

File64

This library will take a file passed as a string and return a Base64 encoded string.

It is intended primarily for use when preparing files for inclusion in JSON files.

The dependencies are all in the default Java libraries.

Functions

base64

Type: Public
Return: String

file_to_byte

Type: Private
Return: byte[]

This function transforms a binary file to byte[] array. file_to_byte is used by base64 when it needs to operate on a file. Because java.util.Base64.getEncoder() requires a byte array to operate on it is necessary to binary files into this type.
This allows it to be turned into a base64 encoded string suitable for use in JSON.