List of utility methods to do Base64 File Encode
String | encodeFile(String filePath) encode File byte[] bytes = fileToBytes(filePath); return encode(bytes); |
String | encodeFile(String filePath) encode File byte[] bytes = fileToByte(filePath); return encode(bytes); |
String | binaryToBase64(File file) Encodes a file to a base 64 string String base64String; RandomAccessFile raFile = new RandomAccessFile(file, "r"); long length = raFile.length(); byte[] binaryVideo = new byte[(int) length]; try { raFile.readFully(binaryVideo); } finally { raFile.close(); ... |