Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best way to do FileHandling..  RSS feed

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I have always thought that there are many ways to implement file handling in your code,but i am unable to come to the conclusion that which class fits best in a particular situation.Example is ByteArrayOutputStream()and many other class.My question is that should i continue to implement file handling the way i normally do or should i learn different ways to implement file handling for same situation.Also if i should
learn the different ways then where can i get good file handling material which shows different classes and there implementations.
Thank you
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Girish:
My question is that should i continue to implement file handling the way i normally do or should i learn different ways to implement file handling for same situation.

Well for someone to answer this you should tell what is the situation and what is "your" way?

Girish:
Also if i should
learn the different ways then where can i get good file handling material which shows different classes and there implementations.

Java tutorials is the way to go.
If you already know basic I/O then you can look into nio(Non blocking I/O)

There is no such "best" way for every scenario. Every class in the jdk makes sense for some situation. If this is not the case then they would not exist in the api.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!