Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.

Read Single Byte FileInputStream


/* 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)
  {

  }

 }
}

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes