using java? how i'm going to get the data in notepad. in short of file streaming?

Re: how to apply file streaming in java? 80 80

I'm not entirely sure what you mean..

Java IO takes care of reading and writing to files and such.

I suggest looking up the BufferedWriter class for writing and BufferedReader for reading.

Re: how to apply file streaming in java? 80 80

By "data in notepad" do you mean a ".txt" file?
That data can be easily read using the FileInputStream or PrintStream

Re: how to apply file streaming in java? 80 80

Yes!..can you show me a sample code in file streaming in java?

getting data in notepad.

Re: how to apply file streaming in java? 80 80

thanks!!

Re: how to apply file streaming in java? 80 80

here u go!
Hope this simple code is informative for you!

import java.io.*;
import java.util.*;

class test
{

	public static void main(String ar[])
	{
		try(FileInputStream f=new FileInputStream("myTxT.txt"))
		{
			Scanner in=new Scanner(f);
			while(in.hasNext())
			{
				System.out.println(in.nextLine());
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
	}
}
Re: how to apply file streaming in java? 80 80

thanks a lot.. i really want to learn how to apply file streaming using java. :)

Re: how to apply file streaming in java? 80 80

Mark this thread as solved, if u have got answers for your questions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.