InputStreamEg in Java Program
InputStreamEg in Java Program
import java.io.*;
class InputStreamEg
{
public Static void main(String arg[]) throws IOException
{
int i;
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the file name with required extension");
FileInputStream f =new FileInputStream(br.readLine());
byte b[] =new byte[f.available()];
f.read(b);
for(i=0;i<b.length;i++)
{
System.out.println((char)b[i]);
}
}
}
0 coment�rios:
Post a Comment