How to convert FileInputStream into string in java?
You can’t directly convert it to string. You should implement something like this Add this code to your method //Commented this out because this is not the efficient way to achieve that //StringBuilder builder = new StringBuilder(); //int ch; //while((ch = fis.read()) != -1){ // builder.append((char)ch); //} // //System.out.println(builder.toString()); Use Aubin’s solution: public static String … Read more