FileInput Example

import java.io.FileInputStream;
import java.io.IOException;
public class App1 {
	public static void main(String[] args) {
		int i = 0;
		try {
			FileInputStream fin = new FileInputStream("D:\\Project1\\data.txt");
			while ((i = fin.read()) != -1) {
				System.out.print((char) i);
			}
		} catch (Exception e) {
		}
	}
}

Download

Input and Output Stream in Java

Example FileOutputStream
Example FileInputStream
DataInput and Output Example
Object Serialization
Object Deserialization
Object Externalizable Example
Example java.io.File class
RandomAccessFile Example


Write your Comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code