/* Read A Single Byte From File using FileInputStream*/
import java.io.*;
class InputStreamDemo
{
  
 public static void main(String[] args)
 {
  
  try
  {
  File f1=new File("MyFile.txt");
  FileInputStream fin=new FileInputStream(f1);
  int ch=fin.read();
  System.out.println("Byte Data Readed From File="+(char)ch);
  }
  catch(Exception e)
  {
  }
 }
}



 
 
 Posted in:
 Posted in:  
0 comments:
Post a Comment