Difference between revisions of "Template:Convert file to base64-encoding using Java"

From Updox API
Jump to: navigation, search
(Created page with " File file = new File("c:\filename.ext"); byte[] bytes = loadFile(file); byte[] encoded = Base64.encodeBase64(bytes); String encodedString = new String(encoded);")
 

Latest revision as of 11:24, 3 December 2013

 File file = new File("c:\filename.ext");
 
 byte[] bytes = loadFile(file);
 
 byte[] encoded = Base64.encodeBase64(bytes);
 
 String encodedString = new String(encoded);