package stream; import java.io.*; public class InputStreamReaderString { public static void main(String[] args) { File f = new File("src/stream","hello.txt"); try(FileInputStream fis = new FileInputStream(f)){ byte[] all = new byte[(int)f.length()]; fis.read(all); String str = new String(all); System.out.println(str); }catch(IOException e) { e.printStackTrace(); } } }