import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; class pp { public static void main(String[] args) throws IOException { File newFile=new File("asdhjsadb.png"); byte[] fileData = new byte[ (int)newFile.length()]; InputStream inStream = new FileInputStream( newFile); inStream.read(fileData); inStream.close(); String tempFileData = new String(fileData); String imageString=new BASE64Encoder().encode(fileData); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)