FileEncoder

Utility class for encoding and decoding files using Base64.

This class provides functions to encode files to Base64 strings, decode Base64 strings back to files, and send files over HTTP as encoded strings.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun decodeBase64(inputbase64: String, output: File): File

Decodes a Base64-encoded string and writes it to the specified file.

Link copied to clipboard
fun encodebase64(ctxt: Context, inputuri: Uri): String?

Encodes the file located at the given URI into a Base64 string.

Link copied to clipboard
fun sendImage(imageURI: Uri?, tgtaddress: InetAddress, tgtport: Int, appctxt: Context): Boolean

Sends an image file to a target host and port using HTTP POST with Base64 encoding.