How to convert a file to Base64?

后端 未结 7 1385
遥遥无期
遥遥无期 2020-12-06 09:58

Here the report contain the path(pathname in sdcard in string format)

File dir = Environment.getExternalStorageDirectory();
File yourFile = new File(dir, rep         


        
7条回答
  •  眼角桃花
    2020-12-06 10:36

    String value = Base64.encodeToString(bytes, Base64.DEFAULT);
    

    But you can directly convert it in to String .Hope this will work for you.

提交回复
热议问题