<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DeepakGaikwad.net &#187; File Reading</title>
	<atom:link href="http://www.deepakgaikwad.net/index.php/tag/file-reading/feed" rel="self" type="application/rss+xml" />
	<link>http://www.deepakgaikwad.net</link>
	<description>Travel Articles and Tech Notes</description>
	<lastBuildDate>Thu, 19 Jan 2012 09:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Different File Read Write Stream Classes in Java</title>
		<link>http://www.deepakgaikwad.net/index.php/2009/12/01/different-file-read-write-stream-classes-in-java.html</link>
		<comments>http://www.deepakgaikwad.net/index.php/2009/12/01/different-file-read-write-stream-classes-in-java.html#comments</comments>
		<pubDate>Tue, 01 Dec 2009 16:25:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[File Reading]]></category>
		<category><![CDATA[File Writing]]></category>
		<category><![CDATA[java.io]]></category>

		<guid isPermaLink="false">http://www.deepakgaikwad.net/?p=993</guid>
		<description><![CDATA[Byte streams, character streams, buffered streams, data streams and object streams are different data reading mechanisms for File IO. Each of the stream has a unique purpose to serve. In this article, we explore details of these streams. Also, we try to find when to use which stream.

Byte Streams:
java.io.FileInputStream and java.io.FileOutputStream are the two classes for reading and writing purpose from/to a file. These classes extend from InputStream and OutputStream respectively. Data read by these classes is in low level format i.e. binary format. Hence if you have following code, ...]]></description>
		<wfw:commentRss>http://www.deepakgaikwad.net/index.php/2009/12/01/different-file-read-write-stream-classes-in-java.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading Text File Line by Line in Java 6</title>
		<link>http://www.deepakgaikwad.net/index.php/2009/11/23/reading-text-file-line-by-line-in-java-6.html</link>
		<comments>http://www.deepakgaikwad.net/index.php/2009/11/23/reading-text-file-line-by-line-in-java-6.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 17:19:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[File Reading]]></category>
		<category><![CDATA[Java 6]]></category>

		<guid isPermaLink="false">http://www.deepakgaikwad.net/?p=984</guid>
		<description><![CDATA[Here is code you will need in Java 6 to read a file on the machine. It uses BufferReader through FileReader. Some of the things you should remember are -

Close the BufferReader in finally block so that it is closed any case.
In BufferReader.close you can opt to ignore exception.
Check the size of file you are reading as buffer.



import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class FileLineByLine {

	public static void main(String[] args) {
		FileLineByLine fileLBL = new FileLineByLine();
		fileLBL.readFileLineByLine();

	}

	public void readFileLineByLine(){
		BufferedReader buffReader = null;
		try{
			buffReader = new BufferedReader (new FileReader("C:\\SampleFile.txt"));
			String line = buffReader.readLine();
			while(line != null){
				System.out.println(line);
				line = buffReader.readLine();
			}
		}catch(IOException ...]]></description>
		<wfw:commentRss>http://www.deepakgaikwad.net/index.php/2009/11/23/reading-text-file-line-by-line-in-java-6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

