public class Myword {
public static void main(String[] args) throws IOException {
try {
FileInputStream file = new FileInputStream("e:/myText.txt");
BufferedInputStream Bfile = new BufferedInputStream(file);
byte[] b = new byte[1024];
String s = "";
int bytesRead=0;
while((bytesRead=Bfile.read(b))!=-1){
s+= new String(b,0,bytesRead);
}
System.out.println(s);
}
}