This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the difference connecting files in differeceways , what is advantage ,how to remember

 
raj talatam
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is difference between conncting Strems like this

FileOutputStream fos=new FileOutputStream(new File("xyza.graphml"));
DataOutputStream dos=new DataOutputStream(fos);
BufferedWriter br=new BufferedWriter(new OutputStreamWriter(dos));

and
FileOutputStream fos=new FileOutputStream(new File("xyza.graphml"));
BufferedOutputStream bos=new BufferedOutputStream(fos);

 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the Java API Documentation? It's all in there.
For your example, DataOutputStream and DataInputStream are used for reading and writing Java primitive types, which is handy if you have a set file format that will be processed by Java applications.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!